How Can I Be Sure The Test Is Right?
How Can I Be Sure The Test Is Right?
●
Write the test
●
Run it and make sure the new test fails
●
Add the new feature / fix the bug
●
Run the test and make sure the new test passes.
●
Some development systems, such as Aegis, can enforce this
process.
●
It's difficult to do this when writing tests for existing code.
▶
Another reason to test as you go