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

Conversation

@collinjackson
Copy link
Contributor

@collinjackson collinjackson commented Oct 25, 2019

Updates README with some documentation updates.

@collinjackson collinjackson changed the title ## Description [e2e] update README Oct 25, 2019
@collinjackson collinjackson requested a review from digiter October 25, 2019 01:57
Note that the tests don't use the `FlutterDriver` API, they use `testWidgets` instead.

Put the a file named `<package_name>_test.dart` in the app' `test_driver` directory:
Put the a file named `<package_name>_e2e_test.dart` in the app' `test_driver` directory:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does flutter test scans _test.dart in a directory and execute them?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. It only looks in the test/ directory by default.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then when executing flutter test without an attached device, the _e2e_test.dart will execute. Is it expected?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

flutter test only looks for tests in the test/ folder. test_driver/ is ignored.


```
./gradlew connectedAndroidTest -Ptarget=`pwd`/../test_driver/<package_name>_e2e.dart
./gradlew app:connectedAndroidTest -Ptarget=`pwd`/../test_driver/<package_name>_e2e.dart
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The suffix should be _e2e.dart or _e2e_test.dart as above?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The suffix here should be _e2e.dart. The _e2e_test.dart suffix is reserved for the driver runner (which I hope will be unnecessary in the future).

Copy link
Contributor

@digiter digiter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Note that the tests don't use the `FlutterDriver` API, they use `testWidgets` instead.

Put the a file named `<package_name>_test.dart` in the app' `test_driver` directory:
Put the a file named `<package_name>_e2e_test.dart` in the app' `test_driver` directory:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then when executing flutter test without an attached device, the _e2e_test.dart will execute. Is it expected?

@collinjackson
Copy link
Contributor Author

Merging this since you LGTM'd it but if you'd like to make more edits let me know.

@collinjackson collinjackson merged commit fe49a79 into flutter:master Oct 28, 2019
mormih pushed a commit to mormih/plugins that referenced this pull request Nov 17, 2019
sungmin-park pushed a commit to sungmin-park/flutter-plugins that referenced this pull request Dec 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants