background image
<< On Test-First Programming | Test Bugs >>
<< On Test-First Programming | Test Bugs >>
The two test-first questions
The two test-first questions
"How can I prove that this feature works?"
Write the simplest test that will fail unless the feature works.
The test must fail.
"What is the least amount of code I can write to pass the test?"
The simpler the test, the simpler the code you need.
The test must now pass.
This produces known good code and a comprehensive test
suite.
Be sure to run the entire test suite after you implement a task.
Don't be afraid of baby steps. That's the point.