What is Defect Detection Efficiency?
Defect Detection Efficiency (DDE) of a phase is the ratio of the number of defects detected in a phase to the total number of defects, expressed as a percentage. DDE is used to measure the effectiveness of each phase.
DDE = (Defects found in that phase ÷ Total defects) x 100
If the total number of bugs found were 120 and the bugs detected in system testing were 30, the DDE of system testing would be: (30 ÷ 120) x 100 = 25%.
Why use Defect Detection Efficiency (DDE)?
Unit testing and integration testing are usually wholly automated, while system testing and acceptance testing mostly involve manual testing. Since manual testing is expensive, it would be advantageous to find bugs in the first two phases. Also, the fix for a bug found in a later phase needs to be retested in the earlier stages.
It is evident that the earlier the bug is found, the better it is - the testing cycle is shortened, it requires fewer resources, and it costs less.
DDE is a metric that helps us in understanding the efficacy of our testing phases.
A Real-world Example
Suppose your software passes through the following testing phases before it is released on production servers:
- Unit Testing
- Integration Testing
- System Testing
- Acceptance Testing
Let's assume that after the software was released on production we have the following data:
Phase | # Defects | DDE | DDE (Cumulative) |
---|---|---|---|
Unit Testing | 25 | 25% | 25% |
Integration Testing | 30 | 30% | 55% |
System Testing | 20 | 20% | 75% |
Acceptance Testing | 10 | 10% | 85% |
Production | 15 | 15% | 100% |
100 |
Observations based on DDE
- More bugs were found in integration testing than in unit testing which means that unit tests could be improved.
- Automated testing (unit and integration testing) only accounted for 55% of the bugs.
- 25% of the bugs were found by customers (in acceptance testing) and end-users (production). This is a large fraction and indicates that the internal testing is ineffective.
Advantages
- Finds gaps in testing phases.
- Retesting can be significantly reduced.
- Overall cost of the project can be reduced.
- Increases the productivity of the QA team.
Conclusion
Defect detection efficiency along with other metrics can be used to optimize the testing phases and reduce the total cost of development.