Android Testing Patterns
Implements robust Android testing patterns using JUnit, MockK, Turbine, and Compose UI for high-quality mobile applications.
This skill provides a comprehensive playbook for Android testing, covering everything from pure JVM unit tests and ViewModel state transitions to instrumented Compose UI and Hilt-integrated tests. It standardizes the use of runTest for coroutines, Turbine for Flow verification, and MockK for behavior mocking. By enforcing best practices like resetting main dispatchers, utilizing semantic matchers for UI, and preferring fakes over complex mocks, it helps developers build maintainable and reliable test suites for modern Android architectures.
主な機能
010 GitHub stars
02Reactive state verification using Turbine for Kotlin Flows
03Standardized JUnit and MockK unit testing patterns
04Compose UI testing via semantic matchers and createComposeRule
05Coroutine testing with runTest and StandardTestDispatcher
06Hilt-integrated instrumentation tests using @BindValue
ユースケース
01Verifying ViewModel state transitions and analytics event logging
02Architecting scalable test suites for Clean Architecture projects
03Debugging failing instrumented tests on emulators or physical devices