[integration_test] Add a run method for proper reporting of test results (#70075)

This commit is contained in:
Jia Hao
2020-11-13 19:57:15 +08:00
committed by GitHub
parent 7cda6866b0
commit af5eb3b987
20 changed files with 481 additions and 170 deletions

View File

@@ -1,24 +0,0 @@
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:convert';
import 'package:integration_test/integration_test.dart';
import 'package:flutter_test/flutter_test.dart';
Future<void> main() async {
final IntegrationTestWidgetsFlutterBinding binding = IntegrationTestWidgetsFlutterBinding.ensureInitialized() as IntegrationTestWidgetsFlutterBinding;
testWidgets('failing test 1', (WidgetTester tester) async {
expect(true, false);
});
testWidgets('failing test 2', (WidgetTester tester) async {
expect(true, false);
});
tearDownAll(() {
print('IntegrationTestWidgetsFlutterBinding test results: ${jsonEncode(binding.results)}');
});
}