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.

 

 

  1. I am so smart I can implement this without test driving it
  2. I don’t know how to write tests
  3. This is a really small change, no need for tests
  4. This cannot break anything
  5. I’m in a rush, no time for TDD
  6. I wanted to write tests, but I didn’t :-)
  7. It’d be too hard to test this mess
  8. TDD’s not a silver bullet. With or without it, doesn’t matter
  9. I’m prototyping
  10. I’ll do the real work, then you can play around with your tests
posted @ 2014-04-01 22:12  crazywings  阅读(171)  评论(0编辑  收藏  举报