A team inherits a legacy codebase with no tests. They want to add tests safely without inadvertently altering behavior. What is the recommended first step?
-
A
Rewrite all modules using TDD
-
B
Write characterization tests to document current behavior before refactoring
-
C
Achieve 100% branch coverage immediately
-
D
Deploy to production and monitor logs for errors