android-testing

Configure unit, Hilt integration, and Roborazzi screenshot tests for Android apps.

Updated Nov 3, 2025
One-click install
npx skills add https://github.com/devanfer02/telnetquiz --skill android-testing-devanfer02
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: android-testing
Source: https://github.com/devanfer02/telnetquiz/tree/main/.claude/skills/android-testing
Command: npx skills add https://github.com/devanfer02/telnetquiz --skill android-testing-devanfer02

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a comprehensive testing strategy for Android apps, covering unit tests, integration tests with DI, and UI screenshot tests to ensure reliability and prevent regressions.

Core Features & Use Cases

  • Unit Tests: validate ViewModels, Repositories, and business logic quickly.
  • Integration Tests: verify interactions between components (Room, Retrofit) and data flows.
  • Hilt Testing: enable dependency injection for isolated testing with HiltAndroidRule.
  • UI/Screenshot Tests: ensure visual correctness across Compose UI with Roborazzi-based tooling.

Quick Start

Start by enabling unit tests, configuring Hilt for testing, and adding Roborazzi-based screenshot tests. Then run ./gradlew test and ./gradlew verifyRoborazziDebug.

Frequently Asked Questions about android-testing

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

FAQPage Schema
How do I run unit tests and UI screenshot tests for Android Compose?

Android UI screenshot tests use Roborazzi tooling to capture and verify visual correctness across Compose UI components. You run ./gradlew verifyRoborazziDebug to compare baseline images against current renders and detect unintended visual regressions.

How does Hilt testing work for Android integration tests?

Hilt testing uses HiltAndroidRule to enable dependency injection for isolated integration testing. This verifies interactions between components like Room and Retrofit, ensuring data flows correctly through injected dependencies during test execution.

What's the best way to structure an Android testing strategy?

The best Android testing strategy combines unit tests for ViewModels and Repositories, Hilt-backed integration tests for component interactions, and Roborazzi screenshot tests for Compose UI. This layered approach ensures fast feedback and prevents both logic and visual regressions.

Can I use Roborazzi for screenshot tests in modern Android projects?

Yes, Roborazzi is specifically applicable to modern Android projects requiring visual regression checks. It integrates with Compose UI to capture screenshot tests, allowing you to verify visual correctness by running the verifyRoborazziDebug Gradle task.

Do I need Hilt to run integration tests for Room and Retrofit?

Using Hilt for integration tests enables dependency injection via HiltAndroidRule, which isolates testing of component interactions like Room and Retrofit. While not strictly mandatory, Hilt testing provides reliable data flow verification for modern Android apps.