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, android_debug_unopt
or android_debug_unopt_arm64
was built, run:
# From the root of the engine repository $ ./testing/scenario_app/run_android_tests.sh android_debug_unopt # Or, for arm64 $ ./testing/scenario_app/run_android_tests.sh android_debug_unopt_arm64
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:
# From the root of the engine repository $ ./testing/scenario_app/run_android_tests.sh android_debug_unopt_arm64 --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:
.
See ci/builders/linux_android_emulator.json
, and grep for run_android_tests.sh
.
The following matrix of configurations is tested on the CI:
API Version | Graphics Backend | Skia Gold | Rationale |
---|---|---|---|
34 | Skia | Android 34 + Skia | Newer Android devices on Skia. |
34 | Impeller (OpenGLES) | Android 34 + Impeller OpenGLES | Newer Android devices on Impeller with OpenGLES. |
34 | Impeller (Vulkan) | Android 34 + Impeller Vulkan | Newer Android devices on Impeller. |