Test Driven Development
- Writing test cases before writing the code doesn’t take any more effort than writing test cases after the code; it simply resequences the test-case-writing activity.
- When you write test cases first, you detect defects earlier and you can correct them more easily.
- Writing test cases first forces you to think at least a little bit about the requirements and design before writing code, which tends to produce better code.
- Writing test cases first exposes requirements problems sooner, before the code is written, because it’s hard to write a test case for a poor requirement.
- If you save your test cases, which you should do, you can still test last, in addition to testing first.
Status:: #wiki/notes/germinating
Plantations:: Software Testing - 20230221103934
References:: ILOG, Code Complete