Android Managed Test Devices
Sets up Gradle Managed Devices so Android instrumented tests run on the same emulators locally and in CI.
Claude's review
7/10 Accurate Gradle Managed Devices DSL, ATD image advice and CI wiring, with honest hedges on version-specific sharding flags.
We asked Claude the question you would ask: would I be glad I installed this? We only sell skills it rates 7 or higher.
In detail
Use this skill to run instrumented Android tests on Gradle Managed Devices (GMD) — emulators that Gradle provisions, boots, runs tests on, and tears down, so CI and every developer get the same device without managing an emulator by hand. Covers the `android.testOptions.managedDevices { localDevices { create(...) { device; apiLevel; systemImageSource } } }` DSL, `ManagedVirtualDevice`, device `groups`, the generated tasks (`<deviceName>DebugAndroidTest`, `<groupName>GroupDebugAndroidTest`, `allDevicesCheck`), Automated Test Device (ATD) images (`aosp-atd`/`google-atd`) for lighter headless CI, test sharding across managed-device copies, where the HTML report and extra outputs land, and how this differs from `connectedAndroidTest` and `adb shell am instrument`. Use when the user mentions "Gradle Managed Devices", "managedDevices", "allDevicesCheck", "ManagedVirtualDevice", "pixel2api30DebugAndroidTest", "ATD image", "automated test device", or "reproducible emulator for tests".
How you use it
- Add it to your pack, then download your pack (1 credit).
- In Claude, open Customize > Skills and upload the zip. Code execution needs to be on under Settings > Capabilities.
- Ask Claude for the job in your own words. It uses the skill when your request matches what it does. Step by step guide
Safety check
Nothing risky found: no hidden instructions, no download and run, no reading of saved passwords or keys.
An automated scan lowers risk but cannot promise zero risk. How we check skills
Preview
The first lines of SKILL.md
---
name: running-tests-on-gradle-managed-devices
description: Use this skill to run instrumented Android tests on Gradle Managed Devices (GMD) — emulators that Gradle provisions, boots, runs tests on, and tears down, so CI and every developer get the same device without managing an emulator by hand. Covers the `android.testOptions.managedDevices { localDevices { create(...) { device; apiLevel; systemImageSource } } }` DSL, `ManagedVirtualDevice`, device `groups`, the generated tasks (`<deviceName>DebugAndroidTest`, `<groupName>GroupDebugAndroidTest`, `allDevicesCheck`), Automated Test Device (ATD) images (`aosp-atd`/`google-atd`) for lighter headless CI, test sharding across managed-device copies, where the HTML report and extra outputs land, and how this differs from `connectedAndroidTest` and `adb shell am instrument`. Use when the user mentions "Gradle Managed Devices", "managedDevices", "allDevicesCheck", "ManagedVirtualDevice", "pixel2api30DebugAndroidTest", "ATD image", "automated test device", or "reproducible emulator for tests".
license: Apache-2.0. See LICENSE for complete terms.
metadata:
author: Jaewoong Eum (skydoves)
keywords:
- android-testing
- instrumented-tests
- gradle-managed-devices
- managedDevices
- allDevicesCheck
- ManagedVirtualDevice
- atd-image
- ci-cd
- test-sharding
- emulator
---
# Running Tests On Gradle Managed Devices — Gradle Owns The Emulator
Gradle Managed Devices (GMD) move the emulator into the build: you declare devices in `build.gradle.kts`, and `./gradlew <device>DebugAndroidTest` downloads the system image, boots a fresh emulator, runs `androidTest`, collects results, and shuts it down. The payoff is reproducibility — CI and every machine run the exact same device — and no hand-managed emulators. This skill covers the DSL, the generated tasks, ATD images for cheap CI, sharding, and where GMD sits relative to `connectedAndroidTest` and raw `am instrument` (see `../../../adb/tests/running-instrumented-tests-via-adb/SKILL.md`).
## When to use this skill
- The user wants instrumented tests to run on a defined, reproducible emulator in CI without `adb`-managing a device.
- The user mentions `managedDevices`, `allDevicesCheck`, `ManagedVirtualDevice`, or a generated task like `pixel2api30DebugAndroidTest`.
- The user wants the test matrix (which API levels / form factors) to live in version control, not in someone's local AVD list.
- CI emulator runs are slow/flaky and the user asks about ATD ("Automated Test Device") images.
- The user wants to shard a slow instrumented suite across several emulator copies.
## When NOT to use this skill
- The user wants to run tests on a physical device or an emulator they already have running — that is `./gradlew connectedAndroidTest` / `connectedDebugAndroidTest`; GMD is for emulators Gradle creates.
- The user is invoking the runner directly without Gradle (`adb shell am instrument -w -r …`, sharding via `-e numShards`, Test Orchestrator wiring) — use `../../../adb/tests/running-instrumented-tests-via-adb/SKILL.md` and `../../../adb/automation/scripting-adb-for-ci/SKILL.md`.
- The user is choosing the `AndroidJUnit4` runner / writing the test class itself — use `../../runner/running-instrumented-tests-with-androidjunit4/SKILL.md`.
- The user wants Compose UI tests specifically — those still run as instrumented tests; GMD just hosts them. See `../../../compose/setup/setting-up-host-vs-device-tests/SKILL.md` for host-vs-device choice first.
## Prerequisites
...From skydoves's repository, Apache-2.0 licence.
Related skills
-
Checked
Android Gradle Plugin upgrade
Moves Kotlin Multiplatform projects to Android Gradle Plugin 9 and fixes the build failures it causes.
8/101 credit -
Checked
CocoaPods to SwiftPM
Moves Kotlin Multiplatform projects from CocoaPods to Swift Package Manager and updates the Xcode project.
8/101 credit -
Checked
Kotlin Native build speed
Diagnoses and fixes slow Kotlin/Native iOS builds in Kotlin Multiplatform projects, both locally and on CI.
8/101 credit -
Checked
SwiftUI Liquid Glass
Adds and reviews Liquid Glass in SwiftUI apps for iOS 26, avoiding pitfalls with bars, buttons and scrolling.
8/101 credit -
Checked
Compose Multiplatform UI
Builds one shared Compose UI in Kotlin for Android, iOS and desktop, so you write your screens once.
7/101 credit -
Checked
SwiftUI Mac app rules
Writes and debugs Swift 6 and SwiftUI code for Mac apps, fixing concurrency, state and common compiler errors.
7/101 credit