Metrics For Testing: Measuring Enables
Metrics For Testing: Measuring Enables
Defect Distribution: Percentage of Total defects Distributed across Requirements Analysis, Design
Reviews, Code Reviews, Unit Tests, Integration Tests, System Tests, User Acceptance Tests, Review by Project
Leads and Project Managers.
Software Process Metrics are measures which provide information about the performance of the
development process itself.
Purpose:
1. Provide an Indicator to the Ultimate Quality of Software being Produced
2. Assists to the Organization to improve its development process by Highlighting areas of
Inefficiency or error-prone areas of the process.
Software Product Metrics are measures of some attribute of the Software Product. (Example, Source Code).
Purpose:
1. Used to assess the quality of the output
What are the most general metrics?
Requirements Management
Metrics Collected
1. Requirements by state – Accepted, Rejected, Postponed
2. No. of baselined requirements
3. Number of requirements modified after base lining
Derived Metrics
1. Requirements Stability Index (RSI)
2. Requirements to Design Traceability
Project Management
Metrics Collected Derived Metrics
1. Planned No. of days 1. Schedule Variance
2. Actual No. of days
Estimated effort 1. Effort Variance
Actual Effort
1. Estimated Cost 1. Cost Variance
2. Actual Cost
1. Estimated Size 1. Size Variance
Actual Size
Testing & Review
Metrics Collected
1. No. of defects found by Reviews
2. No. of defects found by Testing
3. No. of defects found by Client
4. Total No. of defects found by Reviews
Derived Metrics
1. Overall Review Effectiveness (ORE)
2. Overall Test Effectiveness
Peer Reviews
Metrics Collected
1. KLOC / FP per person hour (Language) for Preparation
2. KLOC / FP per person hour (Language) for Review Meeting
3. No. of pages / hour reviewed during preparation
4. Average number of defects found by Reviewer during Preparation
5. No. of pages / hour reviewed during Review Meeting
6. Average number of defects found by Reviewer during Review Meeting
7. Review Team Size Vs Defects
8. Review speed Vs Defects
9. Major defects found during Review Meeting
10. Defects Vs Review Effort
Derived Metrics
1. Review Effectiveness (Major)
2. Total number of defects found by reviews for a project
Other Metrics
Metrics Collected
1. No. of Requirements Designed
2. No. of Requirements not Designed
3. No. of Design elements matching Requirements
4. No. of Design elements not matching Requirements
5. No. of Requirements Tested
6. No. of Requirements not Tested
7. No. of Test Cases with matching Requirements
8. No. of Test Cases without matching Requirements
9. No. of Defects by Severity
10. No. of Defects by stage of - Origin, Detection, Removal
Derived Metrics
1. Defect Density
2. No. of Requirements Designed Vs not Designed
3. No. of Requirements Tested Vs not Tested
4. Defect Removal Efficiency (DRE)
Some Metrics Explained
Schedule Variance (SV)
Description
This metric gives the variation of actual schedule vs. the planned schedule. This is calculated for each
project – stage wise
Formula
SV = [(Actual no. of days – Planned no. of days) / Planned no. of days] * 100
Metric Representation
Percentage
Calculated at
Stage completion
Calculated from
Software Project Plan for planned number of days for completing each stage and for actual number of days
taken to complete each stage
Defect Removal Efficiency (DRE)
Description
This metric will indicate the effectiveness of the defect identification and removal in stages for a given
project
Formula
• Requirements: DRE = [(Requirement defects corrected during Requirements phase) / (Requirement
defects injected during Requirements phase)] * 100
• Design: DRE = [(Design defects corrected during Design phase) / (Defects identified during
Requirements phase + Defects injected during Design phase)] * 100
• Code: DRE = [(Code defects corrected during Coding phase) / (Defects identified during
Requirements phase + Defects identified during Design phase + Defects injected during coding
phase)] * 100
• Overall: DRE = [(Total defects corrected at all phases before delivery) / (Total defects detected at
all phases before and after delivery)] * 100
Metric Representation
Percentage
Calculated at
Stage completion or Project Completion
Calculated from
Bug Reports and Peer Review Reports
Size Variance
Description
This metric gives the variation of actual size Vs. the estimated size. This is calculated for each project
stage wise
Formula
• Size Variance = [(Actual Size – Estimated Size) / Estimated Size] * 100
Metric Representation
• Percentage
Calculated at
• Stage completion
• Project Completion
Calculated from
• Estimation sheets for estimated values in Function Points or KLOC
• Actual size
Description
This metric will indicate the effort spent on preparation for Review. Use this to calculate for languages
used in the Project
Formula
For every language (such as C, C++, Java, XSL, etc…) used, calculate