|
1 |
| -``` |
2 |
| -This directory is for Flutter Web engine integration tests that does not |
3 |
| -need a specific configuration. If an e2e test needs specialized app |
4 |
| -configuration (e.g. PWA vs non-PWA packaging), please create another |
5 |
| -directory under e2etests/web. Otherwise tests such as text_editing, history, |
6 |
| -scrolling, pointer events... should all go under this package. |
| 1 | +# Flutter for Web Engine Integration testing |
| 2 | + |
| 3 | +This directory is for Flutter Web engine integration tests that does not need a specific configuration. If an integration test needs specialized app configuration (e.g. PWA vs non-PWA packaging), please create another directory under e2etests/web. Otherwise tests such as text_editing, history, scrolling, pointer events... should all go under this package. |
| 4 | + |
| 5 | +Tests can be run on both 'debug', 'release' and 'profile' modes. However 'profile'/'release' modes will shorten the error stack trace. 'release' mode is for testing release code. Use 'debug' mode for troubleshooting purposes and seeing full stack traces (if there is an error). For more details on build [modes](https://flutter.dev/docs/testing/build-modes). |
7 | 6 |
|
8 |
| -Tests can be run on both 'release' and 'profile' modes. However 'release' mode |
9 |
| -will shorten the error. Use 'profile' mode for trouble-shooting purposes where |
10 |
| -you can also see the full stack trace. |
| 7 | +## To run the application under test for troubleshooting purposes |
11 | 8 |
|
12 |
| -# To run the application under test for trouble shooting purposes. |
| 9 | +``` |
13 | 10 | flutter run -d web-server lib/text_editing_main.dart --local-engine=host_debug_unopt
|
| 11 | +``` |
14 | 12 |
|
15 |
| -# To run the Text Editing test and use the developer tools in the browser. |
16 |
| -flutter run --target=test_driver/text_editing_e2e.dart -d web-server --web-port=8080 --profile --local-engine=host_debug_unopt |
| 13 | +## To run the Text Editing test and use the developer tools in the browser |
17 | 14 |
|
18 |
| -# To test the Text Editing test with driver you either of the following: |
19 |
| -flutter drive -v --target=test_driver/text_editing_e2e.dart -d web-server --profile --browser-name=chrome --local-engine=host_debug_unopt |
| 15 | +``` |
| 16 | +flutter run test_driver/text_editing_integration.dart -d web-server --web-port=8080 --profile --local-engine=host_debug_unopt |
| 17 | +``` |
| 18 | + |
| 19 | +## To run the test for Text Editing with driver |
20 | 20 |
|
21 |
| -flutter drive -v --target=test_driver/text_editing_e2e.dart -d web-server --release --browser-name=chrome --local-engine=host_debug_unopt |
| 21 | +Either of the following options: |
| 22 | + |
| 23 | +``` |
| 24 | +flutter drive -v --target=test_driver/text_editing_integration.dart -d web-server --profile --local-engine=host_debug_unopt |
22 | 25 | ```
|
| 26 | + |
| 27 | +``` |
| 28 | +flutter drive -v --target=test_driver/text_editing_integration.dart -d web-server --release --local-engine=host_debug_unopt |
| 29 | +``` |
| 30 | + |
| 31 | +## Using different browsers |
| 32 | + |
| 33 | +The default browser is Chrome, you can also use `android-chrome`, `safari`,`ios-safari`, `firefox` or `edge` as your browser choice. Example: |
| 34 | + |
| 35 | +``` |
| 36 | +flutter drive -v --target=test_driver/text_editing_integration.dart -d web-server --release --browser-name=firefox --local-engine=host_debug_unopt |
| 37 | +``` |
| 38 | + |
| 39 | +More details for "Running Flutter Driver tests with Web" can be found in [wiki](https://github.com/flutter/flutter/wiki/Running-Flutter-Driver-tests-with-Web). |
0 commit comments