Wednesday, February 25, 2009

Rules of Thumb - Code Coversage Testing

Assuming that the cyclometric complexity of each method is available to to you:

  1. Cyclometric complexity ~ 0-2 => 0% code coverage testing is required.
  2. Cyclometric complexity ~ 3-5 => 20% code coverage testing is required.
  3. Cyclometric complexity ~ 6-10 => 42% code coverage testing is required.
  4. Cyclometric complexity ~ 25-30 => 57%-80% code coverage testing is required
  5. Cyclometric complexity > 30 => More than 100% code coverage testing is required.

No comments:

Post a Comment