This repository was archived by the owner on Feb 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6k
updating the documentation after integration_test migration #21077
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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). | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.