This repository has been archived by the owner on Feb 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[instrumentation_adapter] Add support for running tests with Flutter driver #2050
Merged
collinjackson
merged 3 commits into
flutter:master
from
collinjackson:flutter_driver_support
Sep 9, 2019
Merged
[instrumentation_adapter] Add support for running tests with Flutter driver #2050
collinjackson
merged 3 commits into
flutter:master
from
collinjackson:flutter_driver_support
Sep 9, 2019
Conversation
This file contains 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
1 task
digiter
reviewed
Sep 9, 2019
return <String, dynamic>{ | ||
'isError': false, | ||
'response': response, | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When would this function return "isError": true?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
digiter
reviewed
Sep 9, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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
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:test
rather thantestWidgets()
. This won't work with the instrumentation_adapter plugin -- they need to be converted over to usetestWidgets
to ensure that the tests results are reported properly. ButtestWidgets()
only works when theTestWidgetsFlutterBinding
is 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-examples
command by replacing the call toenableFlutterDriverExtension
withInstrumentationAdapterFlutterBinding.ensureInitialized()
Required for landing #2025