android-testing

Guide Android testing with Unit, Integration, Hilt, and Roborazzi screenshot tests.

Updated May 29, 2016
One-click install
npx skills add https://github.com/AerisG222/maw-photos-android --skill android-testing-aerisg222
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: android-testing
Source: https://github.com/AerisG222/maw-photos-android/tree/main/.github/skills/android-testing
Command: npx skills add https://github.com/AerisG222/maw-photos-android --skill android-testing-aerisg222

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides comprehensive guidance and best practices for testing Android applications, ensuring code quality and UI stability.

Core Features & Use Cases

  • Testing Pyramid: Understand and implement Unit, Integration, and UI/Screenshot tests.
  • Screenshot Testing: Utilize Roborazzi for efficient visual regression testing without emulators.
  • Hilt Integration Testing: Learn to test dependency injection with Hilt.
  • Use Case: Developers can use this skill to set up a robust testing suite for their Compose UI, ensuring that visual elements remain consistent across releases and that data flows correctly through the application's components.

Quick Start

Implement screenshot testing for your Compose UI by adding the Roborazzi plugin and writing a test using captureRoboImage().

Frequently Asked Questions about android-testing

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

FAQPage Schema
How do I set up Roborazzi screenshot testing for Android Compose UI?

To set up Roborazzi screenshot testing, add the Roborazzi plugin to your project and write a test utilizing the `captureRoboImage()` function to capture and verify your Compose UI layouts without requiring an emulator.

What is the recommended testing strategy for modern Android applications?

A robust Android testing strategy follows the testing pyramid, utilizing Unit tests, Integration tests, and UI or Screenshot tests to ensure code quality, data flow accuracy, and visual stability across releases.

Can I use Hilt for integration testing in my Android app?

Yes, you can use Hilt for integration testing. This skill provides guidance on testing dependency injection setups with Hilt to ensure components interact correctly and data flows properly throughout the application.

Do I need an emulator to run Android screenshot tests with Roborazzi?

No, you do not need an emulator. Roborazzi enables efficient visual regression testing directly, allowing you to capture UI images and verify visual consistency without the overhead of running an Android emulator.

How do I manage testing dependencies for Android using libs.versions.toml?

You can manage testing dependencies by defining them in the `libs.versions.toml` file. This approach centralizes versioning for frameworks like Roborazzi and Hilt, ensuring consistent test setups across your project.