android-testing

Create and debug Android test suites for unit, ViewModel, UI, and screenshot coverage.

1|Updated Feb 28, 2026
One-click install
npx skills add https://github.com/Binh230199/ai --skill android-testing-binh230199
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: android-testing
Source: https://github.com/Binh230199/ai/tree/main/.github/skills/android-testing
Command: npx skills add https://github.com/Binh230199/ai --skill android-testing-binh230199

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you design, write, and debug reliable Android test suites without spending time stitching together scattered testing patterns or unstable setups. It covers the full testing pyramid so teams can keep logic tests fast, integration tests realistic, and UI tests trustworthy.

Core Features & Use Cases

  • Unit testing for UseCases, repositories, utilities, and other pure logic with JUnit and MockK.
  • ViewModel and Flow testing with coroutine test tools and Turbine for state and emission verification.
  • Integration and UI testing for Hilt, Room, Compose, and Espresso workflows across Android Studio and AOSP modules.
  • Screenshot regression testing with tools such as Paparazzi or Roborazzi to catch visual changes early.
  • Practical use case: apply this Skill when a screen is flaky, a ViewModel state transition fails, or a new feature needs a complete test strategy from unit coverage to UI validation.

Quick Start

Ask for the Android test type you need, name the class or feature, and request a ready-to-use test implementation or debug fix.

Frequently Asked Questions about android-testing

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

FAQPage Schema
How do I write reliable Android tests for ViewModel state transitions and Flow emissions?

Android testing for ViewModel state and Flow emissions uses coroutine test utilities and Turbine to verify state transitions and emissions deterministically. This approach stabilizes asynchronous logic tests and ensures accurate coverage.

How do I debug flaky Android UI tests in Compose and Espresso?

Debug flaky Android UI tests in Compose and Espresso by applying structured test utilities and Compose test APIs to verify UI workflows deterministically. This approach isolates flakiness and produces maintainable integration and UI test coverage.

What is the best way to test Room and Hilt integration in Android Studio?

The best way to test Room and Hilt integration in Android Studio is using Hilt test support to inject realistic dependencies. This approach creates deterministic integration tests validating database and dependency injection workflows across modules.

Can I use MockK and JUnit for pure Android unit testing of UseCases and repositories?

Yes, you can use MockK and JUnit for pure Android unit testing of UseCases, repositories, and utilities. This combination generates fast unit tests that mock dependencies and validate pure logic without requiring device or emulator resources.

How do I set up screenshot regression testing for Android Compose UI?

Set up screenshot regression testing for Android Compose UI using tools like Paparazzi or Roborazzi to capture and compare UI screenshots. This catches visual changes early without running full instrumentation tests on physical devices.

Does this approach support testing across both Android Studio and AOSP modules?

Yes, this Android testing approach supports workflows across both Android Studio and AOSP modules. It applies unit, integration, UI, Compose, Espresso, Room, and Hilt test strategies to produce deterministic coverage in both environments.