[英]Flutter Integration Testing- How to run multiple test cases of Flutter integration tests in single command or from single file
[英]How to run multiple testing files with one config file in flutter without making long terminal command?
我想用一個配置文件運行多個集成測試。 通過執行諸如將這些文件添加到單個文件之類的操作。
我找到了這個答案“https://stackoverflow.com/questions/56236606/can-i-run-multiple-integration-tests-with-one-single-config-file-in-flutter”。這里的終端命令長度是隨着測試文件的增加而變得更大。
這是我項目中測試的文件夾結構
我想通過運行 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
通過做如下事情
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();
}
所以命令應該是:
flutter driver --target=test_driver/test_first/app.dart
類似的東西
只需給它文件夾的路徑
顫振驅動器 --target=test_driver/test_first/
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.