Testing Legacy Strategies - Establishing a safety net for untested Android legacy code
Provides strategies and tools to freeze existing behavior with characterization tests, visual regression, and baseline contraction on legacy Android code.
Tags
Updated: 2026-09-23Capabilities
Typical Inputs
Typical Outputs
What this skill does
- Identify high risk legacy files
- Write characterization tests
- Configure Robolectric Native Graphics
- Mock dependencies using MockK
- Run visual regression tests
- Execute Compose Preview screenshot tests
- Shrink detekt and lint baselines
- Perform Golden Master testing
- Enforce Kover coverage thresholds
Inputs
- Untested Android legacy code
- Git commit history
- Gradle build configuration
- Detekt and Lint baseline files
- Compose Preview functions
- Golden Master reference files
Outputs
- Characterization test suites
- Visual regression screenshot diff reports
- Updated Detekt and Lint baseline files
- Golden Master output files
- Kover test coverage verification status
Requirements
- Android Kotlin project environment
- Android Gradle Plugin 8.5 or higher
- Robolectric 4.13 or higher
- MockK 1.13 or higher
- Roborazzi 1.30 or Paparazzi 1.3 or higher
- Kover 0.8.3 or higher
- Git version control system
