Reland "Add a FlutterDriver screenshot test to device lab. #45411" (#46620)

This commit is contained in:
Chris Yang
2019-12-10 12:43:36 -08:00
committed by GitHub
parent c5f61ac3e8
commit 4a0049627f
65 changed files with 1751 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
// 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:async';
import 'package:flutter_devicelab/framework/adb.dart';
import 'package:flutter_devicelab/framework/framework.dart';
import 'package:flutter_devicelab/tasks/integration_tests.dart';
Future<void> main() async {
deviceOperatingSystem = DeviceOperatingSystem.ios;
await task(createFlutterDriverScreenshotTest());
}

View File

@@ -107,6 +107,13 @@ TaskFunction createAndroidSplashScreenKitchenSinkTest() {
);
}
TaskFunction createFlutterDriverScreenshotTest() {
return DriverTest(
'${flutterDirectory.path}/dev/integration_tests/flutter_driver_screenshot_test',
'lib/main.dart',
);
}
class DriverTest {
DriverTest(

View File

@@ -509,6 +509,16 @@ tasks:
required_agent_capabilities: ["mac/ios"]
timeout_in_minutes: 20
flutter_driver_screenshot_test_ios:
description: >
Screenshot tests running on a specifc iPhone 6.
The test makes sure that there is no regression while renderring an image with gl on iOS.
stage: devicelab_ios
required_agent_capabilities: ["mac/ios", "ios/gl-render-image"]
#TODO(cyanglaz): The flaky flag is added because it is the first screenshot test we added.
# Remove the flaky flag when we are sure the test is stable.
flaky: true
# TODO(fujino): does not pass on iOS13 https://github.com/flutter/flutter/issues/41133
# system_debug_ios:
# description: >