skillfed

qa-testing-android

This skill guides you through establishing robust UI testing infrastructure for Android applications. It covers framework selection and configuration for Espresso, Compose Testing, and UIAutomator, enabling you to build automated test suites that validate your app's user interface reliably.

qa-testing-android teaches you to write Espresso tests by starting with framework setup in your Gradle configuration, then structuring tests using ViewMatchers to locate UI elements, ViewActions to simulate user interactions, and ViewAssertions to verify expected outcomes. The skill emphasizes proper selector strategies and idling resource management to ensure tests wait for asynchronous operations before making assertions, reducing flakiness and improving reliability across different device configurations.

AI-generated summary based on this skill's SKILL.md

69 17 MIT updated by vasilyu1983

Install

vasilyu1983/AI-Agents-public/qa-testing-android · repository language: Python

CLI (skillfed)coming soon
git clone https://github.com/vasilyu1983/AI-Agents-public
cp -r AI-Agents-public/frameworks/shared-skills/skills/qa-testing-android ~/.claude/skills/qa-testing-android

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

How do I write Espresso tests for Android?

qa-testing-android teaches you to write Espresso tests by starting with framework setup in your Gradle configuration, then structuring tests using ViewMatchers to locate UI elements, ViewActions to simulate user interactions, and ViewAssertions to verify expected outcomes. The skill emphasizes proper selector strategies and idling resource management to ensure tests wait for asynchronous operations before making assertions, reducing flakiness and improving reliability across different device configurations.

What is the difference between Robolectric and Espresso testing for Android?

qa-testing-android explains that Robolectric runs unit tests on the JVM without an emulator or device, making tests fast but limited to Android framework simulation, while Espresso runs instrumented tests on actual devices or emulators, providing real UI interaction validation. The skill guides you to use Robolectric for rapid unit-level testing during development and Espresso for comprehensive UI testing, building a layered test strategy that covers unit, Robolectric, instrumented UI, and system-level testing for maximum coverage and confidence.

How can I fix flaky Android tests?

qa-testing-android addresses flaky test stabilization through multiple techniques: isolating tests to eliminate state dependencies, implementing proper idling resources to wait for background operations, managing test data consistently, and using explicit waits instead of arbitrary sleeps. The skill teaches you to debug instability by examining timing issues, race conditions, and resource contention, then provides strategies for state management and synchronization that make your Android instrumented tests reliable across varying execution environments.

How do I integrate Android testing into CI/CD pipelines using Gradle Managed Devices?

qa-testing-android shows you how to configure Gradle Managed Devices to run instrumented tests in CI/CD environments without manual device management, then integrate this with GitHub Actions for automated test execution on every code push. The skill covers Gradle command configuration, device matrix setup for testing across multiple Android versions and form factors, and pipeline orchestration so your tests run consistently in headless environments, reducing manual testing overhead and catching regressions early.

What are the best practices for Android UI testing with proper selectors and waits?

qa-testing-android emphasizes writing stable, maintainable Android UI tests by using specific, resilient selectors that target unique UI identifiers rather than fragile positional or text-based matching, implementing explicit waits with idling resources for asynchronous operations, and managing test data through dependency injection or test fixtures. The skill guides you to avoid common pitfalls like hard-coded delays, brittle selectors, and shared state, ensuring your test suite remains maintainable as your app evolves and scales across different devices and Android versions.

How do I set up and configure Android testing frameworks like Espresso, Compose Testing, and UIAutomator?

qa-testing-android provides step-by-step configuration guidance for each framework: Espresso setup includes adding dependencies, configuring test runners, and initializing ActivityScenario; Compose Testing covers the Compose test harness and semantics-based element selection; UIAutomator setup enables cross-app and system-level testing. The skill walks you through Gradle configuration, dependency management, and framework-specific initialization so you can select the right tool for each testing scenario and establish a cohesive testing infrastructure for your Android project.

SKILL.md

rendered from the published skill — quoted content, verbatim

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 | rg -n \"AndroidTest|managedDevice|ManagedDevices\"
Clear app data adb shell pm clear <applicationId>

Quick Start (2026 Defaults)

  • Prefer Gradle Managed Devices (GMD) + ATD images for CI; use

(truncated - see the full file via the links below)

Read as markdown · JSON record · Browse the source repository

File tree — 10 files
frameworks/shared-skills/skills/qa-testing-android/SKILL.md
frameworks/shared-skills/skills/qa-testing-android/assets/template-android-test-checklist.md
frameworks/shared-skills/skills/qa-testing-android/data/sources.json
frameworks/shared-skills/skills/qa-testing-android/references/android-ci-optimization.md
frameworks/shared-skills/skills/qa-testing-android/references/compose-testing.md
frameworks/shared-skills/skills/qa-testing-android/references/espresso-patterns.md
frameworks/shared-skills/skills/qa-testing-android/references/gradle-managed-devices.md
frameworks/shared-skills/skills/qa-testing-android/references/screenshot-testing.md
frameworks/shared-skills/skills/qa-testing-android/references/test-orchestrator-patterns.md
frameworks/shared-skills/skills/qa-testing-android/references/uiautomator.md

Related skills

Tags

ui-automation-frameworks mobile-test-stability ci-pipeline-integration test-layer-strategy device-matrix-coverage async-synchronization-patterns test-isolation-techniques selector-reliability gradle-build-automation artifact-capture-debugging