characterization test
Record the behavior an existing implementation exhibits.
Use this when You need to change legacy code whose intended behavior is poorly documented.
without the term
“Before you touch this old module, can you somehow lock in how it behaves right now so we notice if your cleanup changes anything? Nobody knows exactly what it's supposed to do.”
with the term · How do you ask a model for characterization test?
Add characterization tests around this module before refactoring. Capture current outputs and identify known defects without silently changing expectations.
What is characterization test?
Characterization tests pin down what the code does today, so a later change shows exactly which behavior moved. They record known bugs as known bugs rather than declaring them correct.
Why does characterization test matter when vibe coding?
A cleanup can silently change an undocumented behavior that a caller relies on.
How do you do characterization test?
Capture representative inputs and outputs; label known defects separately from behavior to preserve.
What goes wrong with characterization test?
Freezing incidental output so every harmless edit breaks the suite.