android-testing

Select and implement Android test strategies for unit, Compose UI, Room migration, and coroutine scenarios.

16|Updated Apr 30, 2026
One-click install
npx skills add https://github.com/JCETools-Petra/JCE-Opencode-Tools --skill android-testing-jcetools-petra
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: android-testing
Source: https://github.com/JCETools-Petra/JCE-Opencode-Tools/tree/main/config/skills/android-testing
Command: npx skills add https://github.com/JCETools-Petra/JCE-Opencode-Tools --skill android-testing-jcetools-petra

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Android teams often struggle to maintain reliable test coverage across JVM unit tests, instrumented/device tests, Compose UI, and Room/database migrations—leading to regressions that surface late.

Core Features & Use Cases

  • Correct test type selection: Guides when to use testDebugUnitTest versus connectedDebugAndroidTest based on whether behavior depends on the platform/device.
  • Covers modern Android testing needs: Supports instrumented androidTest flows, Compose UI testing, Room migration tests, and coroutine testing.
  • Evidence-focused verification: Encourages explicitly noting when emulator/device verification was not run, and validating outcomes with the right test strategy.

Quick Start

Ask an AI to help you add or fix Android tests for your current change by recommending the correct test type and writing the specific cases you need (including any Room migration or coroutine coverage) and how to verify results.

Frequently Asked Questions about android-testing

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

FAQPage Schema
When should I use testDebugUnitTest versus connectedDebugAndroidTest for Android testing?

Use testDebugUnitTest for local JVM unit tests when behavior is platform-independent, and connectedDebugAndroidTest for instrumented tests requiring a connected device or emulator. Selecting the correct Android testing strategy prevents late-stage regressions by validating platform-dependent code accurately.

How do I write Compose UI tests for Android?

Compose UI testing is handled by selecting the correct instrumented test strategy to verify UI behavior on an emulator or device. This approach ensures your Compose UI components function correctly by validating user interactions and visual states through connected device execution.

How do I test Room database migrations in Android?

Room migration testing validates database schema changes by running instrumented tests on a connected device. This ensures your Room migrations preserve existing data and maintain database integrity across version updates without introducing runtime failures.

Can I test Android coroutines using local JVM unit tests?

Coroutine testing can be performed using local JVM unit tests when the tested logic is platform-independent. This allows you to verify asynchronous behavior and data flows quickly without needing an emulator or connected device execution.

What is the best way to fix failing Android tests?

Fixing failing Android tests requires identifying the correct test type, whether JVM unit or instrumented, and implementing the specific test cases needed. This approach validates outcomes by applying the right test strategy and reporting emulator execution status as evidence.

Do I need an emulator to run Android instrumented tests?

Yes, instrumented tests require a connected emulator or physical device to execute. The testing strategy explicitly notes when emulator or device verification was not run, ensuring you maintain evidence-focused verification for platform-dependent Android behavior.