My preferred form of testing is "coverage testing". This involves making tests that exercise every line of my code. Making the tests is half the problem, the other half is determining if the test actually does exercise all the code. For that purpose I use the Emma package when testing
Java code.
I find the following test types to be useful:
- unit tests, proving that a small pieces of code do what they're required to do.
- regresion tests, proving that nothing has been broken by the recent changes.
- integration tests, proving that the pieces work together as a whole.
- coverage tests, proving that all code has been run.
- beta tests, actually giving the program to real users.
I'm sure there are more.