Defect Age
What is Defect Age?
Defect age measures the amount of time (or number of phases/builds) that elapses between when a defect is introduced and when it is discovered or fixed.
Ways to Measure Defect Age
- Time-based: The number of days between defect introduction and discovery/resolution.
- Phase-based: The number of development phases the defect has passed through undetected (e.g., introduced in design, found in system testing).
Why Defect Age Matters
Older defects — those that persist through multiple phases before being found — are generally more expensive to fix and often indicate weaknesses in earlier testing or review activities. Tracking defect age helps teams identify where to strengthen their processes.
Worked Example: Phase-Based Defect Age
To calculate phase-based age, give each phase of your life cycle a number, then subtract the phase where the defect was introduced from the phase where it was found.
| Phase | Number |
|---|---|
| Requirements | 1 |
| Design | 2 |
| Coding | 3 |
| Unit testing | 4 |
| Integration testing | 5 |
| System testing | 6 |
| User acceptance testing | 7 |
Now look at four defects from a release:
| Defect | Introduced in | Found in | Defect age |
|---|---|---|---|
| D1: wrong tax rule in the requirement | Requirements (1) | System testing (6) | 5 |
| D2: null check missing | Coding (3) | Unit testing (4) | 1 |
| D3: two modules use different date formats | Design (2) | Integration testing (5) | 3 |
| D4: rounding error in invoice total | Coding (3) | User acceptance (7) | 4 |
The average defect age is (5 + 1 + 3 + 4) / 4 = 3.25 phases. D1 is the most worrying: a requirement mistake survived design, coding and three test levels. That points to weak requirement reviews, not weak testing at the end.
Measuring Time-Based Age in a Tracker
Many teams also track defect age in days. Be clear which definition you use, because two are common:
- Open age: days from when the defect was reported until it was closed or until today. This shows how long problems wait to be fixed.
- Detection age: days from when the faulty code was committed until it was reported. This is harder to measure and needs links between defects and code changes.
In tools like Jira, open age comes from the Created and Resolved dates. Exporting them to a spreadsheet and using a formula such as =Resolved - Created gives the age of each ticket. To support phase-based age, add two custom fields, "Phase introduced" and "Phase detected", and make the first one part of the root-cause step when a defect is closed.
Reading the Metric Together With Others
- Defect leakage shows how many defects escaped one stage to the next. High leakage plus high defect age is a strong sign that early reviews need attention.
- Defect removal efficiency compares defects found before release with those found after. Older defects lower it.
- Severity matters: an old cosmetic defect is less urgent than an old defect in payment logic.
Common mistakes
- Guessing the introduction phase without a root-cause discussion, which makes the numbers meaningless.
- Using the metric to blame individuals instead of improving the process.
- Mixing the two time-based definitions in the same report.
Checklist to start tracking
- Agree on numbered phases for your life cycle.
- Record the detected phase when a defect is logged.
- Record the introduced phase during root-cause analysis.
- Review the average and the oldest defects at each release retrospective.
Ready to master real-world software testing?
Learn manual and automation testing hands-on with mentor-led sessions.