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

Commit 027db90

Browse files
[multiple_web] Update web plugin testing instructions. (#4167)
1 parent e193daf commit 027db90

File tree

6 files changed

+34
-120
lines changed
  • packages
    • connectivity/connectivity_for_web/example
    • file_selector/file_selector_web/example
    • google_maps_flutter/google_maps_flutter_web/example
    • google_sign_in/google_sign_in_web/example
    • url_launcher/url_launcher_web/example
    • video_player/video_player_web/example

6 files changed

+34
-120
lines changed
Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,9 @@
11
# Testing
22

3-
This package utilizes the `integration_test` package to run its tests in a web browser.
3+
This package uses `package:integration_test` to run its tests in a web browser.
44

5-
See [flutter.dev > Integration testing](https://flutter.dev/docs/testing/integration-tests) for more info.
5+
See [Plugin Tests > Web Tests](https://github.com/flutter/flutter/wiki/Plugin-Tests#web-tests)
6+
in the Flutter wiki for instructions to setup and run the tests in this package.
67

7-
## Running the tests
8-
9-
Make sure you have updated to the latest Flutter master.
10-
11-
1. Check what version of Chrome is running on the machine you're running tests on.
12-
13-
2. Download and install driver for that version from here:
14-
* <https://chromedriver.chromium.org/downloads>
15-
16-
3. Start the driver using `chromedriver --port=4444`
17-
18-
4. Run tests: `flutter drive -d web-server --browser-name=chrome --driver=test_driver/integration_driver.dart --target=integration_test/TEST_NAME.dart`, or (in Linux):
19-
20-
* Single: `./run_test.sh integration_test/TEST_NAME.dart`
21-
* All: `./run_test.sh`
8+
Check [flutter.dev > Integration testing](https://flutter.dev/docs/testing/integration-tests)
9+
for more info.
Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,9 @@
11
# Testing
22

3-
This package utilizes the `integration_test` package to run its tests in a web browser.
3+
This package uses `package:integration_test` to run its tests in a web browser.
44

5-
See [flutter.dev > Integration testing](https://flutter.dev/docs/testing/integration-tests) for more info.
5+
See [Plugin Tests > Web Tests](https://github.com/flutter/flutter/wiki/Plugin-Tests#web-tests)
6+
in the Flutter wiki for instructions to setup and run the tests in this package.
67

7-
## Running the tests
8-
9-
Make sure you have updated to the latest Flutter master.
10-
11-
1. Check what version of Chrome is running on the machine you're running tests on.
12-
13-
2. Download and install driver for that version from here:
14-
* <https://chromedriver.chromium.org/downloads>
15-
16-
3. Start the driver using `chromedriver --port=4444`
17-
18-
4. Run tests: `flutter drive -d web-server --browser-name=chrome --driver=test_driver/integration_test.dart --target=integration_test/TEST_NAME.dart`, or (in Linux):
19-
20-
* Single: `./run_test.sh integration_test/TEST_NAME.dart`
21-
* All: `./run_test.sh`
8+
Check [flutter.dev > Integration testing](https://flutter.dev/docs/testing/integration-tests)
9+
for more info.
Lines changed: 7 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,12 @@
11
# Testing
22

3-
This package utilizes the `integration_test` package to run its tests in a web browser.
3+
This package uses `package:integration_test` to run its tests in a web browser.
44

5-
See [flutter.dev > Integration testing](https://flutter.dev/docs/testing/integration-tests) for more info.
5+
See [Plugin Tests > Web Tests](https://github.com/flutter/flutter/wiki/Plugin-Tests#web-tests)
6+
in the Flutter wiki for instructions to setup and run the tests in this package.
67

7-
## Running the tests
8+
Check [flutter.dev > Integration testing](https://flutter.dev/docs/testing/integration-tests)
9+
for more info.
810

9-
Make sure you have updated to the latest Flutter master.
10-
11-
1. Check what version of Chrome is running on the machine you're running tests on.
12-
13-
2. Download and install driver for that version from here:
14-
* <https://chromedriver.chromium.org/downloads>
15-
16-
3. Start the driver using `chromedriver --port=4444`
17-
18-
4. Run tests: `flutter drive -d web-server --browser-name=chrome --driver=test_driver/integration_driver.dart --target=integration_test/TEST_NAME.dart`, or (in Linux):
19-
20-
* Single: `./run_test.sh integration_test/TEST_NAME.dart`
21-
* All: `./run_test.sh`
22-
23-
## Mocks
24-
25-
There's new `.mocks.dart` files next to the test files that use them.
26-
27-
Mock files are [generated by `package:mockito`](https://github.com/dart-lang/mockito/blob/master/NULL_SAFETY_README.md#code-generation). The contents of these files can change with how the mocks are used within the tests, in addition to actual changes in the APIs they're mocking.
28-
29-
Mock files can be updated either manually by running the following command: `flutter pub run build_runner build` (or the `regen_mocks.sh` script), or automatically on each call to the `run_test.sh` script.
30-
31-
Please, add whatever changes show up in mock files to your PRs, or CI will fail.
11+
See [Plugin Tests > Web Tests > Mocks](https://github.com/flutter/flutter/wiki/Plugin-Tests#mocks)
12+
in the Flutter wiki for more information about the `.mocks.dart` files in this package.
Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,9 @@
11
# Testing
22

3-
This package utilizes the `integration_test` package to run its tests in a web browser.
3+
This package uses `package:integration_test` to run its tests in a web browser.
44

5-
See [flutter.dev > Integration testing](https://flutter.dev/docs/testing/integration-tests) for more info.
5+
See [Plugin Tests > Web Tests](https://github.com/flutter/flutter/wiki/Plugin-Tests#web-tests)
6+
in the Flutter wiki for instructions to setup and run the tests in this package.
67

7-
## Running the tests
8-
9-
Make sure you have updated to the latest Flutter master.
10-
11-
1. Check what version of Chrome is running on the machine you're running tests on.
12-
13-
2. Download and install driver for that version from here:
14-
* <https://chromedriver.chromium.org/downloads>
15-
16-
3. Start the driver using `chromedriver --port=4444`
17-
18-
4. Run tests: `flutter drive -d web-server --browser-name=chrome --driver=test_driver/integration_driver.dart --target=integration_test/TEST_NAME.dart`, or (in Linux):
19-
20-
* Single: `./run_test.sh integration_test/TEST_NAME.dart`
21-
* All: `./run_test.sh`
8+
Check [flutter.dev > Integration testing](https://flutter.dev/docs/testing/integration-tests)
9+
for more info.
Lines changed: 7 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,12 @@
11
# Testing
22

3-
This package utilizes the `integration_test` package to run its tests in a web browser.
3+
This package uses `package:integration_test` to run its tests in a web browser.
44

5-
See [flutter.dev > Integration testing](https://flutter.dev/docs/testing/integration-tests) for more info.
5+
See [Plugin Tests > Web Tests](https://github.com/flutter/flutter/wiki/Plugin-Tests#web-tests)
6+
in the Flutter wiki for instructions to setup and run the tests in this package.
67

7-
## Running the tests
8+
Check [flutter.dev > Integration testing](https://flutter.dev/docs/testing/integration-tests)
9+
for more info.
810

9-
Make sure you have updated to the latest Flutter master.
10-
11-
1. Check what version of Chrome is running on the machine you're running tests on.
12-
13-
2. Download and install driver for that version from here:
14-
* <https://chromedriver.chromium.org/downloads>
15-
16-
3. Start the driver using `chromedriver --port=4444`
17-
18-
4. Run tests: `flutter drive -d web-server --browser-name=chrome --driver=test_driver/integration_test_driver.dart --target=integration_test/TEST_NAME.dart`, or (in Linux):
19-
20-
* Single: `./run_test.sh integration_test/TEST_NAME.dart`
21-
* All: `./run_test.sh`
22-
23-
## Mocks
24-
25-
There's `.mocks.dart` files next to the test files that use them.
26-
27-
They're [generated by Mockito](https://github.com/dart-lang/mockito/blob/master/NULL_SAFETY_README.md#code-generation).
28-
29-
Mocks might be manually re-generated with the following command: `flutter pub run build_runner build`. If there are any changes in the mocks, feel free to commit them.
30-
31-
(Mocks will be auto-generated by the `run_test.sh` script as well.)
11+
See [Plugin Tests > Web Tests > Mocks](https://github.com/flutter/flutter/wiki/Plugin-Tests#mocks)
12+
in the Flutter wiki for more information about the `.mocks.dart` files in this package.
Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,9 @@
11
# Testing
22

3-
This package utilizes the `integration_test` package to run its tests in a web browser.
3+
This package uses `package:integration_test` to run its tests in a web browser.
44

5-
See [flutter.dev > Integration testing](https://flutter.dev/docs/testing/integration-tests) for more info.
5+
See [Plugin Tests > Web Tests](https://github.com/flutter/flutter/wiki/Plugin-Tests#web-tests)
6+
in the Flutter wiki for instructions to setup and run the tests in this package.
67

7-
## Running the tests
8-
9-
Make sure you have updated to the latest Flutter master.
10-
11-
1. Check what version of Chrome is running on the machine you're running tests on.
12-
13-
2. Download and install driver for that version from here:
14-
* <https://chromedriver.chromium.org/downloads>
15-
16-
3. Start the driver using `chromedriver --port=4444`
17-
18-
4. Run tests: `flutter drive -d web-server --browser-name=chrome --driver=test_driver/integration_driver.dart --target=integration_test/TEST_NAME.dart`, or (in Linux):
19-
20-
* Single: `./run_test.sh integration_test/TEST_NAME.dart`
21-
* All: `./run_test.sh`
8+
Check [flutter.dev > Integration testing](https://flutter.dev/docs/testing/integration-tests)
9+
for more info.

0 commit comments

Comments
 (0)