android-testing-master

Guide Android unit, integration, and UI testing with Kotlin and Jetpack Compose.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/cycling02/Sonic --skill android-testing-master
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: android-testing-master
Source: https://github.com/cycling02/Sonic/tree/main/.trae/skills/android-testing-master
Command: npx skills add https://github.com/cycling02/Sonic --skill android-testing-master

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps teams eliminate flaky tests, close coverage gaps, and speed up diagnosis and fixes for Android unit, integration, and UI test failures so releases are more reliable.

Core Features & Use Cases

  • Testing Strategy & Patterns: Advice on structuring tests across the pyramid with unit-heavy suites, focused integration tests, and limited E2E/instrumentation runs.
  • Framework & Tool Guidance: Concrete recommendations for JUnit 5, MockK, coroutine test dispatchers, Turbine, Room in-memory testing, DataStore testing, Compose UI testing, and CI orchestration.
  • Real-World Use Case: Analyze failing ViewModel tests, propose deterministic coroutine dispatcher usage, craft Compose UI assertions with semantics and test tags, and design repository integration tests that validate caching and API fallbacks.

Quick Start

Ask the android-testing-master to review your Android project's tests, identify missing scenarios and flaky patterns, and provide concrete test implementations and fixes.

Frequently Asked Questions about android-testing-master

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

FAQPage Schema
How do I fix flaky Android ViewModel tests caused by coroutine dispatchers?▼

Fix flaky Android ViewModel tests by injecting deterministic coroutine test dispatchers to control execution timing. This Skill provides guidance on replacing default dispatchers with controllable test schedulers to ensure reliable and reproducible results.

What is the best way to test Room database migrations and DataStore in Android?▼

Test Room databases and DataStore using in-memory configurations to validate repository caching and fallback behavior. This Skill provides concrete recommendations for designing integration tests that verify local persistence layers safely.

How do I write Jetpack Compose UI tests with semantics and test tags?▼

Write Jetpack Compose UI tests by assigning test tags to composables and asserting state via semantics matchers. This Skill helps craft Compose UI assertions using the ui-test-junit4 framework to verify component states reliably.

Does JUnit 5 work with MockK for Android unit testing?▼

Yes, JUnit 5 works with MockK to mock dependencies in Android unit tests. This Skill provides concrete framework guidance for combining JUnit 5 and MockK to structure unit-heavy test suites and close coverage gaps.

How do I test Kotlin flows in Android using Turbine?▼

Test Kotlin flows in Android using Turbine to collect emissions and assert sequence states over time. This Skill provides guidance on integrating Turbine flow testing to validate ViewModel state streams and repository outputs.

How do I orchestrate Android instrumentation tests in CI environments?▼

Orchestrate Android instrumentation tests in CI by structuring limited E2E runs and focusing on unit-heavy suites. This Skill provides guidance on designing test pyramids and CI-run instrumentation strategies to ensure reliable releases.