Testing Legacy Strategies
CommunitySecurely refactor old code with confidence.
Software Engineering#testing#refactoring#legacy code#android#mockk#characterization tests#roblectric
AuthorBryantChi
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill provides a structured approach to adding tests to existing codebases that lack test coverage, mitigating the risks associated with refactoring and modernization.
Core Features & Use Cases
- Characterization Tests: Capture the current behavior of legacy code to establish a baseline.
- Framework Testing: Utilize Robolectric for testing Android framework-dependent components.
- Mocking Strategies: Employ MockK for effective mocking of Kotlin code, including coroutines.
- Quality Gates: Implement Detekt/Lint baselines to incrementally enforce coding standards.
- Golden Master Testing: Verify complex outputs like HTML or JSON against a known good state.
- Use Case: You have a critical but untested module in a legacy Android application. Use this Skill to first write characterization tests to understand its current behavior, then add Robolectric tests for framework interactions, and finally use MockK to isolate dependencies, creating a safety net before making changes.
Quick Start
Use the testing legacy strategies skill to create characterization tests for the LegacyCalculator class.
Dependency Matrix
Required Modules
None requiredComponents
scriptsreferences
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: Testing Legacy Strategies Download link: https://github.com/BryantChi/Android-Skills/archive/main.zip#testing-legacy-strategies Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.