jargon

Architecture & practice·Legacy systems and migration

you did not know what the function was supposed to do, so you wrote down what it currently does.

Characterisation test

Also calledcharacterization test, golden master test, approval test

A test that records the existing behaviour of code, correct or not, so that a refactor can be shown not to change it. It is the standard first move in untested legacy code: you are not asserting the behaviour is right, only that you have not altered it. Bugs found this way get recorded as tests too, because in a system this old somebody downstream may already depend on them.

Commonly confused with