tree: ee3432baea8bbb366b59d25e4cf4302dc86551ec [path history] [tgz]
  1. app/
  2. .gitignore
  3. BUILD.gn
  4. build.gradle
  5. buildscript-gradle.lockfile
  6. gradle.properties
  7. README.md
  8. settings.gradle
testing/scenario_app/android/README.md

Scenario App: Android Tests

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

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:

Screenshot of the Logs on LUCI.

CI Configuration

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 VersionGraphics BackendSkia GoldRationale
34SkiaAndroid 34 + SkiaNewer Android devices on Skia.
34Impeller (OpenGLES)Android 34 + Impeller OpenGLESNewer Android devices on Impeller with OpenGLES.
34Impeller (Vulkan)Android 34 + Impeller VulkanNewer Android devices on Impeller.

Updating Gradle dependencies

See Updating the Embedding Dependencies.