How Can I Be Sure The Test Is Right?
- 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 ( http://aegis.sf.net/ ), can enforce this process.
It's difficult to do this when writing tests for existing code
- Another reason to test as you go
- Formally called "Test-Driven Development"
Prev | toc | Next