running-instrumented-tests-via-adb
CommunityRun instrumented tests with adb, no Gradle
Software Engineering#sharding#adb#test orchestrator#am instrument#android instrumented tests#ci scripting#instrumentation status codes
Authorskydoves
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill helps you run Android instrumented tests from CI or scripts using adb, avoiding Gradle and preventing misleading outcomes when tests fail.
Core Features & Use Cases
- Run instrumented tests via
adb shell am instrumentusing the required-w(wait) and-r(raw output) flags for reliable CI consumption. - Select and slice test runs with
-earguments such asclass,class#method,package, and sharding vianumShards/shardIndex. - Use AndroidX Test Orchestrator correctly with the proper runner/target wiring (
-e targetInstrumentation ...plus the orchestrator as the positional last argument), includingclearPackageData. - Detect real pass/fail by parsing
INSTRUMENTATION_STATUS_CODE(e.g.,-2failure,-1error) instead of trusting the shell exit code.
Quick Start
Run your single test method directly from a script by calling adb shell am instrument -w -r -e class com.example.MyTest#myMethod com.example.app.test/androidx.test.runner.AndroidJUnitRunner.
Dependency Matrix
Required Modules
None requiredComponents
references
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: running-instrumented-tests-via-adb Download link: https://github.com/skydoves/android-testing-skills/archive/main.zip#running-instrumented-tests-via-adb Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.