Mid-LevelQA Methodology & Strategy
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 prioritisationYou can defend skipping coverage on a path because the risk maths supports it.
- Test design fluencyYou apply equivalence partitioning and decision tables to concrete inputs in real time.
- Metric judgmentYou distinguish between metrics that drive learning and metrics that drive theatre.
- Strategy under constraintYou can produce a defensible plan when the team has half the time and twice the scope.