[英]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.