Skip to main content

How do you measure test coverage and is 100% coverage a good goal?

  • test coverage
  • code coverage
  • quality metrics

Answer it first, then compare. Nothing here is saved or scored.

Model answer

100% code coverage is not a useful goal, it encourages testing trivial code while missing important scenarios. Coverage types: (1) Code coverage - lines/branches executed (measured by Istanbul/c8). (2) Requirements coverage - which requirements have test cases. (3) Risk coverage - which high-risk areas are tested. Better metrics: critical path coverage (are all business-critical flows tested?), mutation testing score (do tests actually catch bugs?), and escaped defect rate (how many bugs reach production?). Aim for high coverage of critical paths, not arbitrary coverage percentages.

What interviewers listen for

  • Risk-based prioritisation
    You can defend skipping coverage on a path because the risk maths supports it.
  • Test design fluency
    You apply equivalence partitioning and decision tables to concrete inputs in real time.
  • Metric judgment
    You distinguish between metrics that drive learning and metrics that drive theatre.
  • Strategy under constraint
    You can produce a defensible plan when the team has half the time and twice the scope.

Terms to know

See all 33 methodology questions

Written by , Senior QA Automation Engineer, 50+ QA candidate interviews conductedLast updated July 2026