Characterization Testing
Installation
SKILL.md
Characterization Testing
Overview
Characterization tests capture current behavior of legacy code, warts and all. They're a safety net before refactoring, not a specification of correctness.
Core principle: Document what IS, not what SHOULD BE. Fix behavior later, after safety net exists.
This is NOT unit testing. Unit tests specify desired behavior. Characterization tests document actual behavior.
When to Use
Use characterization testing when:
- Legacy code has no automated tests
- Unclear what code is supposed to do
- Before refactoring risky/critical areas
- Documentation doesn't match reality
- Need safety net without understanding all edge cases