
* Support Flutter Driver test for Flutter Web application. * Support Flutter Driver test for Flutter Web application. * Fix documentation issues. * Support Flutter Driver test for Flutter Web application. * Fix documentation. * Remove unused file from dartdoc check. * Sync to date. * Revert change to dartdoc. * Address comments. * Apply suggestions from code review Co-Authored-By: Jonah Williams <jonahwilliams@google.com> * Update copyrights. * Update allowed list for browsers. * Verify command line arguments for Drive command is correctly parsed. * Make waitUntilFirstFrameRasterized throw unimplementedError for Flutter Web Driver. * Add comment for why sync WebDriver is used. * Update documentations. * Add more unit tests and update documentation. * Configure test.dart so that web_extension_test will be executed with --platform=chrome. * Revert unnecessary changes. * Add new file path for Windows to blacklist. * Reconstruct the structure of flutter_driver/test/src folder to remove filtering logic in dev/bots/test.dart/ * Fix path to web_extension_test.dart. * Add instructions for how to use WebFlutterDriver. * Update getLayerTree to use sendCommand instead of _sendCommand. * Update pubspec files.
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. Then it compares the screenshot against a golden image stored in test_driver/goldens/<some_test_page_name>/<device_model>.png
.
Add a new page to test
- Create a new class which extends
Page
and implement the UI to be tested in thebuild
method. - The new class should set a static
title
andkey
- Add an instance of the new class to the
_allPages
list in themain.dart
- Create a new test case similar to
"'A page with an image screenshot"
intest_driver/main_test.dart
to run the screenshot test. - Create directories for the test:
test_driver/goldens/<some_test_page_name>
should be created before running the test based on the target platform the test is designed to run.
An example of a Page
subclass can be found in lib/image_page.dart
Experiments
The test currently only runs on device lab ["mac/ios"] which runs the app on iPhone 6s.