Does high Code Coverage mean high test quality?

From CitconWiki
Revision as of 02:52, 29 June 2008 by 124.170.23.178 (talk)
Jump to navigationJump to search

It's possible to write a test which achieves extremely high code coverage for a system yet doesn't test the system at all.

We looked at ways of preventing this, and what other measures one should use to ensure the effectiveness of your test suite?

  • Code Review should be used to ensure that tests, actually test and are not just propping up the coverage metrics
  • Mutation testing, using a tool such as Jester, will also uncover tests which are "weak"
  • Clover2 exposes the list of classes each test covered ("per-test coverage") which can uncover power tests that possibly cover a lot of code yet have little value since they are so ufocused
  • Discussion of whether the number of assert statements a test has could be an effective measure of test quality?

References:

* Jester
* Crucible, Code Review
* Clover2