there are things you need to test for to get test coverage
Function coverage – has each function been tested?
Statement coverage – has each node in the program been executed?
Decision coverage – has each edge in the program been executed? (IF and CASE
statements)
Condition coverage – has each Boolean sub-expression evaluated both to true and false?
Parameter value coverage – Has the most common parameter values been tested?
Loop coverage – Has every loop executed zero times, once, and more than once?
Boundary testing – Test for range boundaries. If an integer variable can be between one and
ten, then test the following values: 0, 1, 2, 9, 10, and 11.
- I am so smart I can implement this without test driving it
- I don’t know how to write tests
- This is a really small change, no need for tests
- This cannot break anything
- I’m in a rush, no time for TDD
- I wanted to write tests, but I didn’t :-)
- It’d be too hard to test this mess
- TDD’s not a silver bullet. With or without it, doesn’t matter
- I’m prototyping
- I’ll do the real work, then you can play around with your tests