flutter/dev/integration_tests/flutter_driver_screenshot_test
stuartmorgan 2d623278e7
Restructure the Windows app template (#53600)
This moves the app template more toward being a more generic starting
point for any Flutter application, eliminating some hard-code
assumptions about there being a single window/engine pair that is
directly bound to the life of the application:
- Moves the runloop into its own class, making it capable of servicing
  any number of engine instances.
- Moves the logic for setting up a window containing only a Flutter view
  into a window subclass for ease of re-use.
- Makes quit-on-window-close an optional property. (Long term this
  should be even more generic, like a quit-when-last-window-closes
  option, but this is a short-term improvement that removes the binding
  between the runloop and the window).
- Allows for multiple instances of Win32Window to exist without issues
  relating to the window class registration.

Since there are getting to be a non-trivial number of files associated
with the runner, this moves the source into a runner/ directory, as is
already done on some other platforms.

Note that creating multiple Flutter windows at the same time still
doesn't work correctly even with this change, but this addresses some of
the known issues, and makes it easier to test in the future (e.g., for
debugging engine-level issues with multiple instances).

Fixes #45397
2020-04-06 12:24:05 -07:00
..
android Reduce gradle deps (#50691) 2020-02-12 21:14:54 -08: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 Move ios screenshot test to flutter gold. (#52553) 2020-03-19 16:27:41 -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 Move ios screenshot test to flutter gold. (#52553) 2020-03-19 16:27:41 -07:00
.metadata Reland "Add a FlutterDriver screenshot test to device lab. #45411" (#46620) 2019-12-10 12:43:36 -08:00
pubspec.yaml Restructure the Windows app template (#53600) 2020-04-06 12:24:05 -07:00
README.md Move ios screenshot test to flutter gold. (#52553) 2020-03-19 16:27:41 -07:00

Summary

This tests contains an app with a main page and sub pages. The main page contains a list of buttons; each button leads to a designated sub page when tapped on. Each sub page should displays some simple UIs to 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 which 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.