This repository was archived by the owner on Feb 22, 2023. It is now read-only.
[instrumentation_adapter] Add support for running tests with Flutter driver#2050
Merged
collinjackson merged 3 commits intoflutter:masterfrom Sep 9, 2019
Merged
Conversation
1 task
digiter
reviewed
Sep 9, 2019
| return <String, dynamic>{ | ||
| 'isError': false, | ||
| 'response': response, | ||
| }; |
Contributor
There was a problem hiding this comment.
When would this function return "isError": true?
Contributor
Author
There was a problem hiding this comment.
We have to attach 'isError': false to the return value or the response will be rejected by FlutterDriver. I thought about returning 'isError': true in the event of test failure, but decided not to for now to match the current behavior running tests under Flutter driver.
noelmansour
pushed a commit
to snowble/plugins
that referenced
this pull request
Nov 13, 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
julianscheel
pushed a commit
to jusst-engineering/plugins
that referenced
this pull request
Mar 11, 2020
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
The instrumentation_adapter plugin doesn't support iOS yet, but we'd like to start sharing integration test code between iOS and Android.
Our existing plugin integration tests are using
test()frompackage:testrather thantestWidgets(). This won't work with the instrumentation_adapter plugin -- they need to be converted over to usetestWidgetsto ensure that the tests results are reported properly. ButtestWidgets()only works when theTestWidgetsFlutterBindingis initialized, and the Flutter driver extension uses a binding that doesn't extendTestWidgetsFlutterBinding.By emulating the Flutter driver extension in the instrumentation_adapter, we can ensure that existing tests can be converted to Flutter plugins CI using the
flutter_plugin_tools drive-examplescommand by replacing the call toenableFlutterDriverExtensionwithInstrumentationAdapterFlutterBinding.ensureInitialized()Required for landing #2025