running-tests-on-gradle-managed-devices

running-tests-on-gradle-managed-devices is a skill for Claude Code, Codex from skydoves/android-testing-skills. It costs 242 tokens per session (3,584 once invoked), scanned B, original, Apache-2.0.

A guide to running Android instrumentation tests on Gradle Managed Devices, where Gradle creates and controls the emulators used by the build. The device definitions can be kept in the project so local and CI runs use the same setup.

In plain words
What is it for?
Use it to define Android test devices in Gradle, run generated device test tasks, use Automated Test Device images in CI, and split tests across devices.
Why use it?
It removes the need to maintain emulators by hand and makes device-based test runs more repeatable across developers and continuous-integration systems.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to define Android test devices in Gradle, run generated device test tasks, use Automated Test Device images in CI, and split tests across devices.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/skydoves/android-testing-skills/running-tests-on-gradle-managed-devices
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add skydoves/android-testing-skills --skill running-tests-on-gradle-managed-devices
Clone the repo
git clone --depth 1 https://github.com/skydoves/android-testing-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for running-tests-on-gradle-managed-devices

README.md
[![agentmods](https://agentmods.dev/badge/skills/skydoves/android-testing-skills/running-tests-on-gradle-managed-devices/github.svg)](https://agentmods.dev/skills/skydoves/android-testing-skills/running-tests-on-gradle-managed-devices)
Your own site
<a href="https://agentmods.dev/skills/skydoves/android-testing-skills/running-tests-on-gradle-managed-devices"><img src="https://agentmods.dev/badge/skills/skydoves/android-testing-skills/running-tests-on-gradle-managed-devices/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for running-tests-on-gradle-managed-devices

Your own site · 80×15
<a href="https://agentmods.dev/skills/skydoves/android-testing-skills/running-tests-on-gradle-managed-devices"><img src="https://agentmods.dev/badge/skills/skydoves/android-testing-skills/running-tests-on-gradle-managed-devices.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 242 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,584 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00242 $0.03584
Opus 5 $0.00121 $0.01792
Sonnet 5 $0.00048 $0.00717
Haiku 4.5 $0.00024 $0.00358

Measured 12d ago against content hash 51dd97d642b8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade B, and why

running-tests-on-gradle-managed-devices scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
instrumentation/managed-devices/running-tests-on-gradle-managed-devices/SKILL.md · 207 lines

How it starts

The opening of the file, as written. The whole thing — 207 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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.

Read the full file on GitHub · 207 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 207 lines · 242 tokens per session scan B 51dd97d642b8

Subscribe to this mod's changes

running-tests-on-gradle-managed-devices is a skill published in the GitHub repository skydoves/android-testing-skills (320 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 242 tokens to every session and 3,584 once invoked, about $0.0012 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

android-ui-journey-testing

XML-specified Android UI journey testing, interactive step execution, assertion verification, and JSON outcome reporting.

sickn33/agentic-awesome-skills · 27 tokens

android_ui_verification

Automated end-to-end UI testing and verification on an Android Emulator using ADB.

sickn33/agentic-awesome-skills · 22 tokens

dogfood

Systematically explore and test a mobile app on iOS/Android with agent-device to find bugs, UX issues, and other problems. Use when asked to dogfood, QA, exploratory test, find issues, bug hunt, or test this app on mobile.

callstack/agent-device · 55 tokens

solopi-ai

A command-line framework for testing Android apps and devices with SoloPi, including on-device or cloud AI decision models. It manages devices, test cases, recorded interactions, replays, performance history, and evidence.

alipay/SoloPi · 127 tokens

eas-simulator

EAS service (paid). Run and control a user's app on a remote iOS/Android simulator hosted on EAS cloud. Read before running any eas simulator: commands - it has the current syntax for this experimental API. Use whenever the user needs a simulator they can't run locally - 'run my app on a cloud simulator', 'use eas…

expo/skills · 249 tokens

flutter-add-integration-test

Configures Flutter Driver for app interaction and converts MCP actions into permanent integration tests. Use when adding integration testing to a project, exploring UI components via MCP, or automating user flows with the integrationtest package.

flutter/agent-plugins · 48 tokens