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
Decision gist · record as of 2026-07-13
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.
Use it when
- qa-testing-android explains that Robolectric runs unit tests on the JVM without an emulator or device.
- qa-testing-android addresses flaky test stabilization through multiple techniques: isolating tests to eliminate state dependencies.
Verify before relying
Read SKILL.md below before installing (10 files). Open directory: indexed for reading, not audited.
Install
vasilyu1983/AI-Agents-public/qa-testing-android · repository language: Python
Open directory. Skills are indexed for reading, not audited. Review a skill's body before installing it.
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)
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
Let your AI agent find skills like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 56,283 agent skills by what they can do, searchable in plain language.
wish › “Set up and configure Android UI testing frameworks (Espresso, Compose Testing, UIAutomator) for a project”
Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →
Related skills
This skill empowers you to create Espresso test scripts for Android applications, streamlining your UI testing automation. Leverage AI-assisted code generation to build robust test cases faster, reducing manual effort and improving test coverage across your Android projects.
This skill helps developers verify Cometchat Android V6 implementation by running comprehensive tests on messaging features, user interactions, and platform compatibility. Use it to catch integration issues early and ensure your Android chat application performs reliably across different device configurations.
This skill equips AI coding agents with expert-level guidance for Android native development using Kotlin and modern Compose frameworks. Designed for developers building production-grade applications, it provides structured best practices and architectural patterns to accelerate your development workflow.
This skill empowers you to create robust Appium test automation scripts tailored for both Android and iOS platforms. Streamline your mobile testing pipeline by leveraging intelligent script generation that handles the complexity of cross-platform app validation.
This skill enables developers to thoroughly test CometChat's Android V5 SDK, ensuring messaging, user authentication, and real-time features work correctly in your Android applications. Run validation checks across core functionality to catch integration issues before deployment.
This skill equips Android developers with a deep understanding of MVVM (Model-View-ViewModel) architecture and ViewModel patterns essential for modern Java-based mobile applications. Learn how to structure your codebase for testability, maintainability, and separation of concerns while implementing lifecycle-aware components that handle configuration changes gracefully.