QA Fundamentals · Senior · Question 6 of 76
How would you introduce testing into a legacy product with no tests?
- 1Write unit tests for every class before touching any of the code
- 2Start with risk-based smoke and characterization tests on critical flows
- 3Freeze all development until full coverage is reached
Show the answer
Correct answer: Start with risk-based smoke and characterization tests on critical flows
Explanation
Characterization tests capture current behaviour, so refactoring has a safety net. Coverage grows where the code changes, guided by risk, not by a coverage target.