General test theory
The purpose of this page is to list some "rules" with regards to general test theory. If you disagree or don't understand the following statements, please leave a comment. These rules are assumed to be common knowledge, so no explanation will be provided unless someone ask.
- Don't test trivial code!
- Use test coverage tools only as indications as to where your testing efforts will give the most value. Aiming for a certain level of test coverage just don't make sense!
- Main reasons for writing tests:
- make sure we deliver the functionality the customer is paying us for
- its a very efficient way of producing working code
- easily testable code has quality attributes we want.
- While a bottom-up approach is best when developing a new system, a top-down approach is often advantageous when writing tests for an existing system.
- A test should have only one reason to change. (Try to avoid writing tests that test overlapping functionality.)
- It does not matter when you write tests as long as you work efficiently and tests are written during development.