Software Testing Metrics
Software Testing Metrics
Software testing metrics are quantitative measures used to evaluate the effectiveness, quality, and progress of testing activities. They help teams identify gaps, improve processes, and ensure alignment with project goals.
Test Metrics provide a quantitative measure of specific attributes of the software testing and development process, thereby assisting QA teams in making informed decisions. Software testing metrics are crucial in evaluating the testing process’s efficiency, effectiveness, and progress. Test Metrics calculation enables us to measure the test artifacts’ quality and make the right decisions.
Important Software Testing Metrics
- Test Coverage
- Defect Density
- Defect Detection Percentage (DDP)
- Test Case Pass Rate
- Mean Time to Failure (MTTF)
- Test Execution Rate
- Defect Removal Efficiency (DRE)
Test Coverage
Formula: (Number of Tested Requirements / Total Requirements) × 100
Example: If 45 out of 50 requirements are tested, Test Coverage = (45/50) × 100 = 90%.
Defect Density
Formula: Total Defects Identified / Size of Software (e.g., KLOC)
Example: 10 defects in a 5 KLOC module → Defect Density = 10/5 = 2 defects/KLOC.
Defect Detection Percentage (DDP)
Formula: (Defects Found During Testing / (Defects Found During Testing + Defects Found Post-Release)) × 100
Example: 80 defects found during testing and 20 post-release → DDP = (80/100) × 100 = 80%.
Test Case Pass Rate
Formula: (Number of Passed Test Cases / Total Executed Test Cases) × 100
Example: 150 passed out of 200 executed test cases → Pass Rate = (150/200) × 100 = 75%.
Mean Time to Failure (MTTF)
Formula: Total Time of Testing / Number of Failures
Example: 100 hours of testing with 5 failures → MTTF = 100/5 = 20 hours.
Test Execution Rate
Formula: Total Test Cases Executed / Time Taken (e.g., per day)
Example: 50 test cases executed in 5 days → Execution Rate = 50/5 = 10 test cases/day.
Defect Removal Efficiency (DRE)
Formula: (Defects Found During Testing / (Defects Found During Testing + Defects Found in Production)) × 100
Example: 90 defects found during testing and 10 in production → DRE = (90/100) × 100 = 90%.
Active Defects:
Defects | Number | Description |
Active defects by severity and priority | ||
Active defects by the assignee | ||
All Defects:
Defects | Number | Description |
Active resolved and closed defects | ||
Defects by severity and priority | ||
Test Case Coverage Metrics
Test case coverage metrics are included to identify the next priority testing tasks.
Test Cases | Number | Description |
Number of test cases Passed vs. Failed vs. remaining to run | ||
Number of test cases run vs. left to run | ||
% of test cases Passed vs. Failed vs. remaining to run | ||
% of test cases run vs. left to run |
Automation Test Case Coverage Metrics
Automation Test case coverage metrics are included to identify the next priority automation testing tasks. (Code reviews, skipped test cases root cause, valid automation failures or false negatives, etc.)
Automated Test Cases | Number | Description |
Number of Automated test cases Passed vs. Failed vs. Skipped remaining to run | ||
Number of Automated test cases Run vs. Skipped left to run | ||
% of Automated test cases Passed vs. Failed vs. Skipped remaining to run |