flutter/packages/flutter_tools/bin
Matan Lurey 4cd0e33013
Implement golden-file matching for integration_test on Android and iOS devices (#160484)
Work towards https://github.com/flutter/flutter/issues/143299.
Work towards https://github.com/flutter/flutter/issues/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`](1398dc7eec/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 https://github.com/flutter/flutter/pull/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`.
2024-12-28 19:48:20 +00:00
..
analysis_options.yaml Enable avoid_print lint. (#91444) 2021-10-07 16:48:04 -07:00
flutter_tools.dart Reland "Null safety migration of packages/flutter_tools/bin" (#111756) 2022-09-16 12:39:55 -07:00
fuchsia_asset_builder.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
fuchsia_tester.dart Implement golden-file matching for integration_test on Android and iOS devices (#160484) 2024-12-28 19:48:20 +00:00
macos_assemble.sh [native assets] Create NativeAssetsManifest.json instead of kernel embedding (#159322) 2024-11-27 11:03:19 +00:00
podhelper.rb [SwiftPM] Update .flutter-plugin-dependencies format (#158138) 2024-11-12 20:01:26 +00:00
tool_backend.bat License update (#45373) 2019-11-27 15:04:02 -08:00
tool_backend.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
tool_backend.sh License update (#45373) 2019-11-27 15:04:02 -08:00
xcode_backend.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
xcode_backend.sh [flutter_tools] Port xcode backend to dart (#86753) 2021-07-27 14:39:05 -07:00
xcode_debug.js Wait for CONFIGURATION_BUILD_DIR to update when debugging with Xcode (#135444) 2023-09-26 17:48:19 +00:00