Thu 21 Jul 2005
TDD + Debuggers = Test Driven Bug Fixing
Posted by dkaz under Programming, Testing, Process
Test Driven Bug Fixing (TDBF) in 4 Simple Steps:
1) Debug your application to locate the source of the problem (skip to step 3
if you have a hunch where the problem lies and think you can duplicate it
with a unit test)
2) Analyze the code in question to figure out the right class & method to add
in your fix (no bandaids, people!)
3) Duplicate the problem by writing a unit test that exposes the bug (your unit
test should fail at this point)
4) Implement your fix (ALWAYS do this last; as soon as your unit test passes
you’re golden)
