qa-testing-android

vasilyu1983/ai-agents-public · updated Apr 8, 2026

MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.

$npx skills add https://github.com/vasilyu1983/ai-agents-public --skill qa-testing-android
0 commentsdiscussion
summary

Android testing automation with Espresso, UIAutomator, and Compose Testing.

skill.md

QA Testing (Android)

Android testing automation with Espresso, UIAutomator, and Compose Testing.

Core References: Android Testing Docs, Espresso, Compose Testing

Quick Reference

Task Command
List emulators emulator -list-avds
Start emulator emulator @<avd_name>
List devices adb devices
Install APK adb install -r <path-to-apk>
Run unit tests ./gradlew test
Run instrumented tests (connected) ./gradlew connectedAndroidTest
Run instrumented tests (GMD) ./gradlew <device><variant>AndroidTest
List GMD tasks `./gradlew tasks --all
Clear app data adb shell pm clear <applicationId>

Quick Start (2026 Defaults)

  • Prefer Gradle Managed Devices (GMD) + ATD images for CI; use connectedAndroidTest for local ad-hoc runs.
  • Enable test isolation via AndroidX Test Orchestrator for instrumented tests.
  • Disable animations via Gradle testOptions (preferred) instead of per-runner ADB steps.
  • Keep selectors stable: withId() (Views), testTag (Compose), resource-id/content-desc (UIAutomator).

Recommended Gradle defaults for stable instrumented tests (version catalog names vary by project):

android {
    testOptions {
        animationsDisabled = true
        execution = "ANDROIDX_TEST_ORCHESTRATOR"
    }
}

dependencies {
    androidTestUtil(libs.androidx.test.orchestrator)
}

When to Use

  • Debug or stabilize flaky Android UI tests
  • Add Espresso tests for View-based UIs
  • Add Compose UI tests for composables
  • Add UIAutomator tests for system UI or cross-app flows
  • Set up an Android test gate in CI

Inputs to Gather

  • UI stack: Views, Compose, or mixed
  • Test layer: unit, Robolectric, instrumented UI, UIAutomator/system
  • CI target: PR gate vs nightly vs release; emulator vs device farm
  • Device matrix: min/target API, form factors, locales (if relevant)
  • Flake symptoms: timeouts, missing nodes, idling/sync, device-only issues
  • App seams: DI hooks for fakes, feature flags, test accounts/test data

Testing Layers

Layer Framework Scope
Unit JUnit + Mockito JVM, no Android
Unit (Android) Robolectric JVM, simulated
UI (Views) Espresso Instrumented
UI (Compose) Compose Testing Instrumented
System UIAutomator Cross-app

Core Principles (Stability)

Device Matrix

  • Default: emulators for PR gates; real devices for release
  • Cover: min supported API level, target API level, plus tablet/foldable if supported

Flake Control

  • Prefer Gradle testOptions { animationsDisabled = true } for instrumented tests
  • Use AndroidX Test Orchestrator to isolate state and recover from crashes
  • Use IdlingResources / Compose idling + waitUntil instead of sleeps
  • Mock network with MockWebServer (or your DI fake) and avoid live backends
  • Reset app state per test (test account/data, storage, feature flags)

Writing Tests

  • Espresso (Views): open references/espresso-patterns.md
  • Compose: open references/compose-testing.md
  • UIAutomator (system/cross-app): open references/uiautomator.md

Workflows

Add a New UI Test (Instrumented)

  • Pick framework: Espresso (Views) vs Compose Testing vs UIAutomator boundary.
  • Add stable selectors: View id, Compose Modifier.testTag, system resource-id/content-desc.
  • Control externals: fake/mock network + deterministic test data.
  • Add waits: IdlingResources / Compose idling + waitUntil (avoid sleeps).
  • Run locally: ./gradlew connectedAndroidTest (or a single test via runner args).

Diagnose a Flaky Instrumented Test

  • Confirm reproduces: run the test 10x; isolate to one device/API if needed.
  • Remove nondeterminism: network, clock/timezone, locale, feature flags, animations.
  • Replace sleeps with idling/explicit waits; validate your IdlingResource actually idles.
  • Capture artifacts: logcat + screenshot + screen recording for failures.
  • If still flaky, isolate app state (orchestrator + clear data) and bisect the interaction steps.

Add a CI Gate (Preferred: GMD)

  • Configure GMD + ATD images (see references/gradle-managed-devices.md).
  • Run PR gate on a small matrix; expand via groups for nightly/release.
  • Ensure artifacts upload on failure: **/build/reports/androidTests/, screenshots/logcat.

ADB Commands (Triage)

# Screenshot
adb exec-out screencap -p > screenshot.png

# Screen recording
adb shell screenrecord /sdcard/demo.mp4

CI Integration

Preferred: Gradle Managed Devices (GMD). See references/gradle-managed-devices.md.

# .github/workflows/android.yml
name: Android CI
on: [push, pull_request]
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-java@v4
        with:
          java-version: '17'
          distribution: 'temurin'
      - uses: gradle/actions/setup-gradle@v3
      - run: ./gradlew test pixel6api34DebugAndroidTest

Navigating References

The reference guides are intentionally large; search within them instead of loading everything:

  • rg -n \"^## \" frameworks/shared-skills/skills/qa-testing-android/references/compose-testing.md
  • rg -n \"Idling|waitUntil|Synchronization\" frameworks/shared-skills/skills/qa-testing-android/references/compose-testing.md
  • rg -n \"RecyclerView|Intents\" frameworks/shared-skills/skills/qa-testing-android/references/espresso-patterns.md

Do / Avoid

Do

  • Prefer orchestrator + per-test isolation for instrumented tests
  • Use IdlingResources / waitUntil for async waits
  • Use Robot/Page Object patterns for readability and reuse
  • Run a small device matrix on PRs; expand on nightly/release

Avoid

  • Thread.sleep() for synchronization
  • Tests depending on live network/backends
  • Flaky selectors (localized text, position-only selectors)

Resources

Resource Purpose
references/espresso-patterns.md Espresso matchers, actions
references/compose-testing.md Compose testing guide
references/uiautomator.md UIAutomator patterns (system UI)
references/gradle-managed-devices.md Managed Devices for CI
references/screenshot-testing.md Visual regression for Android
references/test-orchestrator-patterns.md AndroidX Test Orchestrator patterns
references/android-ci-optimization.md CI pipeline optimization
data/sources.json Documentation links

Templates

Template Purpose
assets/template-android-test-checklist.md Stability checklist

Related Skills

Skill Purpose
software-mobile Android development
qa-testing-strategy Test strategy
qa-testing-mobile Cross-platform mobile

Fact-Checking

  • Use web search/web fetch to verify current external facts, versions, pricing, deadlines, regulations, or platform behavior before final answers.
  • Prefer primary sources; report source links and dates for volatile information.
  • If web access is unavailable, state the limitation and mark guidance as unverified.
how to use qa-testing-android

How to use qa-testing-android on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your development machine
  • Node.js version 16.0+ with npm package manager (verify with node --version)
  • Active project directory or workspace where you want to add qa-testing-android
2

Execute installation command

Execute the skills CLI command in your project's root directory to begin installation:

$npx skills add https://github.com/vasilyu1983/ai-agents-public --skill qa-testing-android

The skills CLI fetches qa-testing-android from GitHub repository vasilyu1983/ai-agents-public and configures it for Cursor.

3

Select Cursor when prompted

The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ── always included ────
│ • Amp
│ • Antigravity
│ • Cline
│ • Codex
│ ●Cursor(selected)
│ • Cursor
│ • Windsurf
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/qa-testing-android

Reload or restart Cursor to activate qa-testing-android. Access the skill through slash commands (e.g., /qa-testing-android) or your agent's skill management interface.

Security & Verification Notice

We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.

Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.

List & Monetize Your Skill

Submit your Claude Code skill and start earning

GET_STARTED →

Use Cases

Task Automation & Efficiency

Automate repetitive workflows and reduce manual effort

Example

Generate reports, summarize documents, draft communications

Save 3-5 hours per week on routine tasks

Knowledge Enhancement

Learn new skills, understand complex topics, get expert guidance

Example

Explain concepts, provide examples, suggest learning resources

Accelerate learning and skill development by 2x

Quality Improvement

Enhance output quality through reviews, suggestions, and refinements

Example

Review drafts, suggest improvements, catch errors

Improve work quality by 30-40% with less effort

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client with skill support
  • Clear understanding of task or problem to solve
  • Willingness to iterate and refine outputs

Time Estimate

15-45 minutes depending on use case complexity

Installation Steps

  1. 1.Install skill using provided installation command
  2. 2.Test with simple use case relevant to your work
  3. 3.Evaluate output quality and relevance
  4. 4.Iterate on prompts to improve results
  5. 5.Integrate into regular workflow if valuable

Common Pitfalls

  • Expecting perfect results without iteration
  • Not providing enough context in prompts
  • Using skill for tasks outside its intended scope
  • Accepting outputs without review and validation

Best Practices

✓ Do

  • +Start with clear, specific prompts
  • +Provide relevant context and constraints
  • +Review and refine all outputs before using
  • +Iterate to improve output quality
  • +Document successful prompt patterns

✗ Don't

  • Don't use without understanding skill limitations
  • Don't skip validation of outputs
  • Don't share sensitive information in prompts
  • Don't expect skill to replace human judgment

💡 Pro Tips

  • Be specific about desired format and style
  • Ask for multiple options to choose from
  • Request explanations to understand reasoning
  • Combine AI efficiency with human expertise

When to Use This

✓ Use When

Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.

✗ Avoid When

Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.

Learning Path

  1. 1Familiarize yourself with skill capabilities and limitations
  2. 2Start with low-risk, non-critical tasks
  3. 3Progress to more complex and valuable use cases
  4. 4Build expertise through regular use and experimentation

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.653 reviews
  • Dhruvi Jain· Dec 24, 2024

    qa-testing-android has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Mei Singh· Dec 24, 2024

    qa-testing-android fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • James Robinson· Dec 24, 2024

    Registry listing for qa-testing-android matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Emma Bansal· Dec 8, 2024

    Solid pick for teams standardizing on skills: qa-testing-android is focused, and the summary matches what you get after install.

  • Rahul Santra· Nov 23, 2024

    Solid pick for teams standardizing on skills: qa-testing-android is focused, and the summary matches what you get after install.

  • Nikhil Johnson· Nov 19, 2024

    qa-testing-android is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Oshnikdeep· Nov 15, 2024

    qa-testing-android reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Li Smith· Nov 15, 2024

    We added qa-testing-android from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Nikhil Taylor· Nov 15, 2024

    Keeps context tight: qa-testing-android is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Pratham Ware· Oct 14, 2024

    qa-testing-android is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

showing 1-10 of 53

1 / 6