Skip to main content
Momentic offers two ways to run Android tests:
  • Remote emulators are hosted by Momentic and boot in under a second. Upload your APK, pick a channel and tag, and tests run against a fresh instance every time.
  • Local emulators use your Android Studio installation to run tests on your machine.
We recommend teams standardize on one or the other rather than mixing. Pick the platform per test through the Region dropdown, any Momentic region selects remote emulators; Local selects local.

Remote emulators

Momentic provisions fresh emulator instances on-demand. Average provisioning time is under 1 second.

APK management

Remote emulators install your app from build artifacts organized into channels and tags. Upload via the Momentic dashboard’s Assets page or via the momentic-mobile assets command.
  • Channels are release environments: dev, staging, production. You can also use channels to separate apps, e.g. production-trading vs. production-banking.
  • Tags are versions within a channel. We recommend semver (0.0.1, 1.2.0) or some other identifier tied to code changes.
Each channel/tag combination can have a build per platform, the same production/1.2.0 channel/tag pair can hold both an Android APK and an iOS .app. When creating or editing a test, pick a channel and tag from the test settings.

APK requirements

Momentic requires an .apk file. If the APK contains WebView content, enable WebView debugging, see App setup.

Regions

The Region property on each test defines where its emulator is provisioned. If unset, Momentic picks the closest region to the caller’s IP. Supported remote regions for Android:
  • US West (us-west1)
  • EU North (eu-north1)
  • Asia South (as-south1)
If none of these is close to you, use local emulators instead.

Android versions

Android 14 and 15 are supported. Select your version in each test’s options.

Local emulators

Configuration

Local emulators run against Android Virtual Devices (AVDs) that you manage yourself. Provide the AVD ID to Momentic, and install your APK via one of:
  1. Install APK step: run a preset Install APK step at any point in a test with a path to the APK.
  2. Test-level APK path: set an APK path in each test’s settings; it’s installed when the emulator boots.
  3. Environment-based settings: see below.

Environment-based Android settings

Teams that don’t commit AVDs or APKs can configure them per environment using shell interpolation:
momentic.config.yaml
environments:
  - name: local
    envVariables:
      LOCAL_AVD_ID: ${MOMENTIC_AVD_ID:-Pixel_9_API_35}
      LOCAL_APK_PATH: ${MOMENTIC_APK_PATH:-../../data/android-test-apks/drag-drop-native/app-debug.apk}
Each developer then sets MOMENTIC_AVD_ID and MOMENTIC_APK_PATH in their .env file or ~/.zshrc, no need to commit the values. Environment-based config is active only when the test runs in that environment, and can’t be overridden at the test level.

Overrides in CI

The run command supports --local-avd-id and --local-apk-path flags, which take precedence over everything else.