android-test-emulator

star 1.2k

Launch or create the local Android emulator required before running Android connected/instrumented tests in this repository. Use this whenever running Android tests is required and no suitable device is already connected.

composablehorizons By composablehorizons schedule Updated 6/3/2026

name: android-test-emulator description: Launch or create the local Android emulator required before running Android connected/instrumented tests in this repository. Use this whenever running Android tests is required and no suitable device is already connected.

Android Test Emulator

Use this skill before running Android connected tests such as connectedAndroidTest or connectedDebugAndroidTest.

The required AVD name is Unstyled_Tests. If it does not exist, create it with:

  • API level: 23
  • System image: system-images;android-23;default;x86_64, except Apple Silicon Macs use system-images;android-23;default;arm64-v8a
  • Display: 320x640
  • Density: 160 dpi
  • CPU cores: 2
  • Disk size: 2048M

Workflow

  1. Check connected devices:

    adb devices
    
  2. If a device is already connected and booted, use it.

  3. Create the project emulator if it does not exist:

    bash scripts/createAndroidEmulator
    
  4. Launch the project emulator:

    bash scripts/launchAndroidEmulator
    
  5. Wait until boot is complete before running Android tests. The script waits for:

    adb shell getprop sys.boot_completed
    
  6. After the emulator is ready, run the requested Android test task.

Notes

  • Do not run Android tests until the emulator appears in adb devices as device and sys.boot_completed is 1.
  • If emulator is not on PATH, use $ANDROID_HOME/emulator/emulator, $ANDROID_SDK_ROOT/emulator/emulator, or $HOME/Library/Android/sdk/emulator/emulator.
  • The script uses the same runtime options expected for test execution: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none.
Install via CLI
npx skills add https://github.com/composablehorizons/compose-unstyled --skill android-test-emulator
Repository Details
star Stars 1,175
call_split Forks 58
navigation Branch main
article Path SKILL.md
More from Creator
composablehorizons
composablehorizons Explore all skills →