Types of Test Metrics
Common Categories of Test Metrics
Process Metrics
Measure the efficiency of the testing process itself, such as test case execution rate, defect detection percentage, and effort variance.
Product Metrics
Measure the quality of the software product, such as defect density, defect severity distribution, and mean time between failures.
Project Metrics
Measure overall project health, such as schedule variance, cost variance, and resource utilisation.
Examples of Specific Test Metrics
- Test Case Execution Rate: Percentage of planned test cases executed.
- Defect Density: Number of defects per unit size (e.g., per KLOC or per module).
- Defect Removal Efficiency: Percentage of defects found before release versus after.
- Test Coverage: Percentage of requirements or code covered by tests.
Base Metrics and Derived Metrics
Every metric starts with raw counts collected during testing, known as base metrics: test cases planned, executed, passed, failed and blocked, defects found, defects fixed and effort spent. Derived metrics are ratios built from these counts. They are what managers actually read, because a ratio allows comparison across releases while a raw count does not.
Worked Example With Formulas
Imagine a release of a billing module with the following numbers, invented purely for practice: 200 test cases planned, 170 executed, 153 passed, 48 valid defects found by the team before release, 2 defects reported by users after release, 6 defect reports rejected as invalid, and a module size of 12 KLOC.
| Metric | Formula | Result |
|---|---|---|
| Test execution rate | Executed / Planned × 100 | 170 / 200 = 85% |
| Pass rate | Passed / Executed × 100 | 153 / 170 = 90% |
| Defect density | Defects / Size | 48 / 12 = 4 per KLOC |
| Defect removal efficiency | Pre-release defects / (Pre-release + Post-release) × 100 | 48 / 50 = 96% |
| Defect leakage | Post-release defects / Total defects × 100 | 2 / 50 = 4% |
| Defect rejection ratio | Rejected reports / Total reports × 100 | 6 / 54 ≈ 11% |
Reading them together tells a story. Execution at 85% means 30 cases have not run yet, so the pass rate might still change. A high removal efficiency is encouraging, while an 11% rejection ratio suggests some bug reports need clearer steps or a better understanding of requirements.
Picking Metrics That Answer Real Questions
Collecting dozens of numbers wastes time. A simple method is to start with a goal, turn it into a question, and only then choose a metric:
- Goal: release with fewer customer complaints.
- Question: how many defects escape our testing?
- Metric: defect leakage per release, tracked over several releases.
Other useful pairings include blocked test cases for spotting environment problems, average defect age for checking fix speed, and requirement coverage for confirming that nothing in scope was forgotten.
How Metrics Get Misused
- Ranking testers by defect count. People start logging trivial or duplicate bugs, and the rejection ratio climbs.
- Celebrating a 100% pass rate. If only easy cases were executed, the number hides risk. Always show it next to execution rate and coverage.
- Comparing defect density across very different modules. A complex payment engine and a static help page should not be judged on the same scale.
- Reporting numbers without trend. One value says little. Show the last few builds or releases so improvement or decline is visible.
- Changing definitions mid-project. If "executed" sometimes includes blocked cases and sometimes does not, the trend becomes meaningless.
A compact daily test report
- Execution progress against plan
- Pass, fail and blocked counts
- Open defects by severity
- Top risks and blockers in one or two lines
Ready to master real-world software testing?
Learn manual and automation testing hands-on with mentor-led sessions.