Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

updating the documentation after integration_test migration #21077

Merged
merged 4 commits into from
Sep 11, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 32 additions & 15 deletions e2etests/web/regular_integration_tests/README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,39 @@
```
This directory is for Flutter Web engine integration tests that does not
need a specific configuration. If an e2e 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.
# Flutter for Web Engine Integration testing

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.

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).

Tests can be run on both 'release' and 'profile' modes. However 'release' mode
will shorten the error. Use 'profile' mode for trouble-shooting purposes where
you can also see the full stack trace.
## To run the application under test for troubleshooting purposes

# To run the application under test for trouble shooting purposes.
```
flutter run -d web-server lib/text_editing_main.dart --local-engine=host_debug_unopt
```

# To run the Text Editing test and use the developer tools in the browser.
flutter run --target=test_driver/text_editing_e2e.dart -d web-server --web-port=8080 --profile --local-engine=host_debug_unopt
## To run the Text Editing test and use the developer tools in the browser

# To test the Text Editing test with driver you either of the following:
flutter drive -v --target=test_driver/text_editing_e2e.dart -d web-server --profile --browser-name=chrome --local-engine=host_debug_unopt
```
flutter run test_driver/text_editing_integration.dart -d web-server --web-port=8080 --profile --local-engine=host_debug_unopt
```

## To run the test for Text Editing with driver

flutter drive -v --target=test_driver/text_editing_e2e.dart -d web-server --release --browser-name=chrome --local-engine=host_debug_unopt
Either of the following options:

```
flutter drive -v --target=test_driver/text_editing_integration.dart -d web-server --profile --local-engine=host_debug_unopt
```

```
flutter drive -v --target=test_driver/text_editing_integration.dart -d web-server --release --local-engine=host_debug_unopt
```

## Using different browsers

The default browser is Chrome, you can also use `android-chrome`, `safari`,`ios-safari`, `firefox` or `edge` as your browser choice. Example:

```
flutter drive -v --target=test_driver/text_editing_integration.dart -d web-server --release --browser-name=firefox --local-engine=host_debug_unopt
```

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).