Android Testing

0•

Guides the creation of deterministic Android unit tests using clean constructor seams, coroutine scheduler alignment, and outcome-based assertions.

The Android Testing skill provides practical, high-impact rules to ensure Android unit tests fail only for the right reasons. It prevents common testing pitfalls such as test flakiness and tautological assertions by enforcing constructor parameter seams with production defaults, proper coroutine test dispatcher and scheduler sequencing, and assertion boundaries focused on observable behavior rather than internal implementation details.

주요 기능

010 GitHub stars
02Guides outcome-based assertions that test observable state rather than fragile implementation mechanisms
03Distinguishes when interaction testing is genuinely required versus when it causes brittle tests
04Eliminates state leakage between tests running in the same JVM process
05Enforces clean test seams via constructor parameters with default arguments instead of mutable state or static mocks
06Prevents coroutine test dispatcher synchronization issues through strict single-scheduler ordering rules

사용 사례

01Reviewing and hardening test suites against flaky async failures and over-specified mock verifications
02Writing Kotlin coroutine unit tests that accurately advance virtual time across multiple dispatchers
03Refactoring Android production classes to make them testable without exposing internal mutable state