android-testing

Guide Android application testing with unit, integration, Hilt, and screenshot tests.

10.4k|519|Updated Apr 15, 2023
One-click install
npx skills add https://github.com/maxrave-dev/SimpMusic --skill android-testing-maxrave-dev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: android-testing
Source: https://github.com/maxrave-dev/SimpMusic/tree/main/.claude/skills/android-testing
Command: npx skills add https://github.com/maxrave-dev/SimpMusic --skill android-testing-maxrave-dev

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a comprehensive guide to testing modern Android applications, ensuring code quality, reliability, and visual consistency.

Core Features & Use Cases

  • Unit Testing: Learn to isolate and test individual components like ViewModels and Repositories.
  • Integration Testing: Understand how to test interactions between different parts of your app, such as database operations or network calls.
  • Screenshot Testing: Implement visual regression testing using Roborazzi to catch unintended UI changes.
  • Hilt Testing: Master dependency injection testing with Hilt for robust integration tests.
  • Use Case: Ensure your new feature's UI remains consistent across different devices and doesn't break existing functionality by implementing a full suite of unit, integration, and screenshot tests.

Quick Start

Run the command to record new screenshot tests for your Android application.

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 Android screenshot testing with Roborazzi?

Android screenshot testing with Roborazzi requires setting up dependency management via libs.versions.toml and executing commands to record baseline screenshots for visual regression checks.

How do I test Hilt dependency injection in Android integration tests?

Testing Hilt dependency injection utilizes HiltAndroidRule to configure the testing environment, ensuring robust integration tests for Android application components and dependency graphs.

What is the best way to structure Android unit tests for ViewModels?

Structuring Android unit tests involves isolating individual components like ViewModels and Repositories to validate code logic independently before proceeding to integration testing.

Does this Android testing guide cover database and network integration tests?

Yes, this Android testing guide covers integration testing for database operations and network calls to verify interactions between different app components and ensure reliability.

When do I need to run Roborazzi screenshot tests for my Android app?

Run Roborazzi screenshot tests when implementing new features to ensure UI visual consistency across different devices and catch unintended visual regressions in your Android app.