【发布时间】:2020-02-11 14:19:09
【问题描述】:
当使用 Flutter test 和 drive 选项时,我们可以根据之前的结果来控制某些测试的执行吗?我们在测试中有一个skip 选项。但是,无论如何我都无法检查程序中是否通过了先前的测试。例如:
void main() {
group('Group A', () {
FlutterDriver driver;
// Connect to the Flutter driver before running any tests.
setUpAll(() async {
driver = await FlutterDriver.connect();
});
// Close the connection to the driver after the tests have completed.
tearDownAll(() async {
if (driver != null) {
driver.close();
}
});
test('Test A', () async {
});
test('Test B', () async {
});
test('Test C', () async {
});
});
}
我的问题是,如果 A 失败,我该如何跳过 B 和 C 的执行?如何跳过 group B id group A 测试失败的执行?
【问题讨论】:
标签: flutter dart flutter-dependencies flutter-test