in reply to
Testaholics Anonymous (or how I learned to stop worrying and love Test::More)
I would just like to say that redundant tests have some negative qualities:
- The test suite will run slower, and with 2,500 tests, that is going to become an issue.
- Time spent developing unnecessary tests detracts from development of new code.
I have some common sense guidelines for test writing:
- Test the boundary cases far more than the regular cases.
- Focus tests on buggy or expected-to-be-buggy code.
- If you can write the test cases first, then good for you, but be aware that the test suite is broken until the code is completed.
- Interesting things happen when Person A writes tests for Person B's code.
- If you have performance requirements, write tests that only pass if those requirements are met.
- Coverage is important.