简体   繁体   English

如何在不发出长终端命令的情况下在flutter中使用一个配置文件运行多个测试文件?

[英]How to run multiple testing files with one config file in flutter without making long terminal command?

I want to run multiple integration tests with one config file.我想用一个配置文件运行多个集成测试。 By doing something like adding those files to a single file.通过执行诸如将这些文件添加到单个文件之类的操作。

I found this answer "https://stackoverflow.com/questions/56236606/can-i-run-multiple-integration-tests-with-one-single-config-file-in-flutter".Here the terminal command length is getting bigger as the test files are increasing.我找到了这个答案“https://stackoverflow.com/questions/56236606/can-i-run-multiple-integration-tests-with-one-single-config-file-in-flutter”。这里的终端命令长度是随着测试文件的增加而变得更大。

This is the folder structure of testing in my project是我项目中测试的文件夹结构

I want to run both tests by running app.dart without using lengthy commands as below.我想通过运行 app.dart 来运行这两个测试,而不使用如下冗长的命令。

flutter drive --target=test_driver/test_first/app.dart --driver=test_driver/test_first/app_test.dart flutter drive --target=test_driver/test_first/app.dart --driver=test_driver/test_first/login_test.dart

by doing something as below通过做如下事情

import 'package:flutter_driver/driver_extension.dart';
import 'package:digiemo_flutter/main.dart' as app;

void main() {
  enableFlutterDriverExtension();

  //need to do something as below
  run app_test //some code to run first test
  run login_test //some code to run second test

  app.main();
 } 

so the command should be:所以命令应该是:

flutter driver --target=test_driver/test_first/app.dart

something like that类似的东西

Simply give it the path of the folder只需给它文件夹的路径

flutter drive --target=test_driver/test_first/颤振驱动器 --target=test_driver/test_first/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Flutter 集成测试 - 如何在单个命令或单个文件中运行 Flutter 集成测试的多个测试用例 - Flutter Integration Testing- How to run multiple test cases of Flutter integration tests in single command or from single file 我可以在 Flutter 中使用一个配置文件运行多个集成测试吗? - Can I run multiple integration tests with one single config file in Flutter? 无法在 VS 代码终端上运行 flutter 命令 - Unable to run flutter command on VS code terminal 如何在不花这么长时间的情况下运行 flutter 应用程序? - how to run flutter app without taking so long? 为什么我可以在 linux 终端中运行 flutter 命令,但不能在 vscode 终端中运行? - Why i can run flutter command in linux terminal, but not in vscode terminal? Flutter - 如何在不缓冲的情况下播放两个相对较长的音频文件 - Flutter - How to play two relatively long audio files without buffering 如何将多个 dart 文件中的字符串传递给 flutter 中的一个 dart 文件? - How to pass strings from multiple dart files and get it to one dart file in flutter? 如何在 Flutter 运行命令中重命名连接的设备? - How can one rename a connectd device in Flutter run command? 如何在 Android Studio 终端上运行 Flutter 命令 - How to run Flutter commands on Android Studio Terminal Flutter:如何加载文件进行测试 - Flutter: how to load file for testing
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM