As mentioned in the top-level README, this directory contains the Android-specific native code and tests for the scenario app. To run the tests, you will need to build the engine with the appropriate configuration.
For example, for the latest android
build you've made locally:
dart ./testing/scenario_app/bin/run_android_tests.dart
Or for a specific, build, such as android_debug_unopt_arm64
:
dart ./testing/scenario_app/bin/run_android_tests.dart --out-dir=../out/android_debug_unopt_arm64
See also:
e: scenario-app, platform-android
labels.Debugging the tests on CI is not straightforward but is being improved:
Locally (or on a temporary PR for CI), you can run the tests with the --smoke-test
argument to run a single test by class name, which can be useful to verify the setup:
dart ./testing/scenario_app/bin/run_android_tests.dart --smoke-test dev.flutter.scenarios.EngineLaunchE2ETest
The result of adb logcat
and screenshots taken during the test will be stored in a logs directory, which is either FLUTTER_LOGS_DIR
(if set, such as on CI) or locally in out/.../scenario_app/logs
.
You can then view the logs and screenshots on LUCI. For example:
For a full list of flags, see the runner.
See ci/builders
and grep for run_android_tests.dart
.
[!NOTE] As of 2024-02-28, Flutter on Android defaults to the Skia graphics backend.
There are two code branches we test using scenario_app
:
SurfaceTexture
.ImageReader
.There are two code branches we test using scenario_app
:
SurfaceTexture
.ImageReader
.There is only a single code branch we test using scenario_app
:
See Updating the Embedding Dependencies.
The generated output will be checked against a golden file (expected_golden_output.txt
) to make sure all output was generated. A patch will be printed to stdout if they don't match.