flutter/dev/integration_tests/flutter_driver_screenshot_test
2020-10-26 19:22:25 -07:00
..
android move compile/target sdk versions to 29 (#62799) (#63008) 2020-08-11 14:51:02 -07:00
assets Reland "Add a FlutterDriver screenshot test to device lab. #45411" (#46620) 2019-12-10 12:43:36 -08:00
fuchsia/meta Implement takeScreenshot and add driver test for Fuchsia (#48611) 2020-01-14 12:29:09 -08:00
ios Revert "Build iOS apps using Swift Packages (#68361)" (#68546) 2020-10-19 17:57:32 -07:00
lib Renamed test class to avoid conflict with the navigator page api. (#53279) 2020-03-25 12:11:01 -07:00
test_driver Remove unused 'dart:async' imports. (#65568) 2020-09-16 14:14:06 -07:00
.metadata Reland "Add a FlutterDriver screenshot test to device lab. #45411" (#46620) 2019-12-10 12:43:36 -08:00
pubspec.yaml Revert "Revert "Driver vm service (#68654)" (#69074)" (#69077) 2020-10-26 19:22:25 -07:00
README.md ✒ Spell Check All .md Files Related to Flutter 💙 (#61564) 2020-07-22 18:23:47 -07:00

Summary

This test contains an app with a main page and subpages. The main page contains a list of buttons; each button leads to a designated subpage when tapped on. Each subpage should display some simple UIs to the screenshot tested.

The flutter driver test runs the app and opens each page to take a screenshot.

Use main_test.dart to test against golden files stored on Flutter Gold.

Note that new binaries can't be checked in the Flutter repo, so use Flutter Gold instead.

Add a new page to test

  1. Create a new class that extends Page and implement the UI to be tested in the build method.
  2. The new class should set a static title and key
  3. Add an instance of the new class to the _allPages list in the main.dart
  4. Create a new test case similar to "'A page with an image screenshot" in test_driver/main_test.dart to run the screenshot test.

An example of a Page subclass can be found in lib/image_page.dart

Environments

  • Device Lab which runs the app on iPhone 6s.
  • LUCI which runs the app on a Fuchsia NUC device.