android-testing

Guide Android teams in implementing unit, integration, and UI testing strategies.

Updated Apr 6, 2026
One-click install
npx skills add https://github.com/jperezdelreal/GymBro --skill android-testing-jperezdelreal
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: android-testing
Source: https://github.com/jperezdelreal/GymBro/tree/main/.squad/skills/android/android-testing
Command: npx skills add https://github.com/jperezdelreal/GymBro --skill android-testing-jperezdelreal

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Android teams struggle to implement comprehensive testing across unit, integration, and UI layers, leading to flaky releases and slow feedback.

Core Features & Use Cases

  • Unit Testing: Write fast, isolated tests for ViewModels, Repos, and business logic.
  • Integration & UI Testing: Validate interactions across components (Room, Retrofit, Compose UI) with end-to-end confidence.
  • Hilt & Testing Tools: Leverage Hilt for dependency injection in tests and screenshot testing with Roborazzi for visual validation.

Quick Start

Run the standard Gradle test tasks to execute unit, integration, and UI tests across your Android modules.

Frequently Asked Questions about android-testing

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

FAQPage Schema
How do I structure Android testing across unit, integration, and UI layers?

Structure Android testing by applying the testing pyramid: write fast isolated unit tests for ViewModels, integration tests for components like Room and Retrofit, and UI tests for end-to-end confidence.

How do I use Hilt for dependency injection in Android tests?

Use Hilt for dependency injection in Android tests to replace real dependencies with mocked instances, enabling isolated testing of ViewModels and business logic across your modules.

Can I do screenshot testing for Android Compose UI using Roborazzi?

Screenshot testing with Roborazzi captures your Compose UI layouts during tests to detect visual regressions, providing an automated way to validate UI appearance without manual inspection.

What's the best way to test Android ViewModels and business logic?

The best way to test Android ViewModels is by writing isolated unit tests that verify business logic independently of the UI framework, ensuring fast feedback and reliable execution for core app rules.

Do I need JUnit and Espresso knowledge to implement Android UI tests?

Yes, implementing Android UI tests requires knowledge of JUnit and Espresso or Compose testing to automate interactions and validate component behavior across your application's user interface.

Why are my Android integration tests failing across Room and Retrofit components?

Android integration tests fail when interactions across Room and Retrofit are not properly isolated, requiring comprehensive strategies that validate component behavior to prevent flaky releases and ensure reliable feedback.