-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Refactor TestGoldenComparator to be useful for non-web (Android, iOS) integration tests
#160215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
auto-submit
merged 4 commits into
flutter:master
from
matanlurey:refactor-test-golden-comparator
Dec 16, 2024
Merged
Refactor TestGoldenComparator to be useful for non-web (Android, iOS) integration tests
#160215
auto-submit
merged 4 commits into
flutter:master
from
matanlurey:refactor-test-golden-comparator
Dec 16, 2024
Conversation
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
Contributor
Author
|
Ping @andrewkolos @jonahwilliams :) |
jonahwilliams
approved these changes
Dec 16, 2024
Contributor
jonahwilliams
left a comment
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
Contributor
Author
|
@andrewkolos Your feedback is still welcome, and I'm happy to make adjustments in a follow-up PR. |
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Dec 17, 2024
…roid, iOS) integration tests (flutter/flutter#160215)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Dec 17, 2024
…roid, iOS) integration tests (flutter/flutter#160215)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Dec 17, 2024
…roid, iOS) integration tests (flutter/flutter#160215)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Dec 17, 2024
…roid, iOS) integration tests (flutter/flutter#160215)
github-merge-queue bot
pushed a commit
that referenced
this pull request
Dec 28, 2024
…iOS devices (#160484) Work towards #143299. Work towards #160043. --- This PR implements, end-to-end, support for `matchesGoldenFile` when (a) running with `package:integration_test` (b) on a device, such as an Android emulator, Android device, iOS simulator, or iOS device, where the _runner_ of a test file does not have process and local-file system access. There are multiple parts to this PR; I could make it smaller than 1K lines, but the bulk of that is tests, and it would mean landing PRs that are incomplete and unused, which does not seem useful - so instead here is a quick overview of the PR's contents - questions/feedback welcome, and I am willing to break code out or land incremental refactors if requested. 1. Augmented `flutter_platform.dart` (used for iOS and Android), similar to [`flutter_web_platform.dart`](https://github.com/flutter/flutter/blob/1398dc7eecb696d302e4edb19ad79901e615ed56/packages/flutter_tools/lib/src/test/flutter_web_platform.dart#L117-L128), now creates and uses [`test_golden_comparator.dart`](https://github.com/flutter/flutter/blob/master/packages/flutter_tools/lib/src/test/test_golden_comparator.dart) to proxy calls (coming from the VM service protocol) for golden-file updates and comparisons to a `flutter_tester` process. A full explanation of how (or why) it works this way is too hard to include here, but see #160215 for more details. 1. Added `VmServiceProxyGoldenFileComparator`, which is a currently unused (outside of a single e2e test) comparator that forwards calls to `compare` and `update` to the VM service protocol (of which, the other side of this is implemented above, in `flutter_platform.dart`. The idea is that this comparator would be used automatically when running in an integration test on a device that requires it (similar to how web works today), but that is **not** wired up yet and requires additional work in `flutter_tools`. 1. Added two unit tests (of both the client and server), and a full e2e-test using it to run `matchesGoldenFile`.
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 6, 2025
…roid, iOS) integration tests (flutter/flutter#160215)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 6, 2025
…roid, iOS) integration tests (flutter/flutter#160215)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 6, 2025
…roid, iOS) integration tests (flutter/flutter#160215)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 7, 2025
…roid, iOS) integration tests (flutter/flutter#160215)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 7, 2025
…roid, iOS) integration tests (flutter/flutter#160215)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 7, 2025
…roid, iOS) integration tests (flutter/flutter#160215)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 7, 2025
…roid, iOS) integration tests (flutter/flutter#160215)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 7, 2025
…roid, iOS) integration tests (flutter/flutter#160215)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 7, 2025
…roid, iOS) integration tests (flutter/flutter#160215)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 7, 2025
…roid, iOS) integration tests (flutter/flutter#160215)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 7, 2025
…roid, iOS) integration tests (flutter/flutter#160215)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 8, 2025
…roid, iOS) integration tests (flutter/flutter#160215)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 8, 2025
…roid, iOS) integration tests (flutter/flutter#160215)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 8, 2025
…roid, iOS) integration tests (flutter/flutter#160215)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 8, 2025
…roid, iOS) integration tests (flutter/flutter#160215)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Feb 12, 2025
…roid, iOS) integration tests (flutter/flutter#160215)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Feb 13, 2025
…roid, iOS) integration tests (flutter/flutter#160215)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Feb 13, 2025
…roid, iOS) integration tests (flutter/flutter#160215)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Mar 6, 2025
…roid, iOS) integration tests (flutter/flutter#160215)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Mar 7, 2025
…roid, iOS) integration tests (flutter/flutter#160215)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Part of #160043, makes it easier to add #160131.
This PR has no functional changes to any of the code, but does refactor both the code and tests:
updateandcompareversus a positional nullable boolean)String?to explain the possible results of the methodsshellPathvariable toflutterTesterBinPathWebRendererenvironment variable setting toflutter_web_platform.dartAfter this PR, I can use it in the non-web branch of the Flutter tool without any hacks or TODOS :)
/cc @eyebrowsoffire (trivial web refactoring), @camsim99 (changes being made to tool).