running-instrumented-tests-via-adb

Execute Android instrumented tests via adb shell am instrument.

Updated Jul 20, 2026
One-click install
npx skills add https://github.com/trancee/MeshLink-template --skill running-instrumented-tests-via-adb-trancee
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: running-instrumented-tests-via-adb
Source: https://github.com/trancee/MeshLink-template/tree/main/.agents/skills/android-testing-skills/adb/tests/running-instrumented-tests-via-adb
Command: npx skills add https://github.com/trancee/MeshLink-template --skill running-instrumented-tests-via-adb-trancee

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill solves the issue of running Android instrumented tests directly from the command line or CI environments without the overhead or limitations of Gradle, ensuring reliable exit codes and proper test execution.

Core Features & Use Cases

  • Direct Execution: Run tests using am instrument directly, bypassing Gradle for faster CI feedback loops.
  • Advanced Control: Supports test sharding across multiple devices, specific method targeting, and integration with the AndroidX Test Orchestrator.
  • Use Case: When you need to run a specific test method on a device farm or integrate test execution into a custom CI pipeline that requires parsing raw instrumentation status codes.

Quick Start

Use the running-instrumented-tests-via-adb skill to execute a specific test class on a connected device using the AndroidJUnitRunner.

Frequently Asked Questions about running-instrumented-tests-via-adb

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run Android instrumented tests via ADB without Gradle?

Run Android instrumented tests without Gradle by executing the adb shell am instrument command directly. This bypasses build constraints, providing faster CI feedback loops and reliable exit codes for automated test execution environments.

Can I run specific test methods or classes using the am instrument command?

Yes, the am instrument command supports granular test control, allowing you to target specific test classes or filter down to individual methods. This ensures precise test execution on connected devices or within custom pipelines.

Does AndroidX Test Orchestrator work with direct ADB instrumented test execution?

AndroidX Test Orchestrator integrates directly with ADB instrumented test execution. Using the am instrument command, you can leverage the Orchestrator to isolate test crashes and ensure accurate pass or fail reporting in your CI pipeline.

How do I parallelize instrumented tests across multiple Android devices?

Parallelize instrumented tests across multiple devices using test sharding via the am instrument command. This distributes test execution, accelerating runs on device farms by splitting tests across connected hardware for faster overall completion.

Why does my CI pipeline fail to report accurate instrumented test results?

CI pipelines fail to report accurate instrumented test results when instrumentation status codes and wait flags are not handled properly. Parsing raw am instrument output correctly ensures reliable pass or fail exit codes for automated environments.