Software Test Metrics – Product Metrics & Process Metrics
Before starting what is Software Test Metrics and types, I would like to start with the famous quotes in terms of metrics.
You can’t control what you can’t measure – Tom Demacro (an American software engineer, author, and consultant on software engineering topics).
Software Test Metrics
Software test metrics is to monitor and control process and product. It helps to drive the project towards our planned goals without deviation.
Metrics answer different questions. It’s important to decide what questions you want answers to.
Software test metrics are classified into two types
#1. Process Metrics
Software Test Metrics used in the process of test preparation and test execution phase of STLC.
The following are generated during the Test Preparation phase of STLC:
#1.1. Test Case Preparation Productivity
It is used to calculate the number of Test Cases prepared and the effort spent for the preparation of Test Cases.
Formula:
Test Case Preparation Productivity = (No of Test Case)/ (Effort spent for Test Case Preparation)
E.g.:
No. of Test cases = 240
Effort spent for Test case preparation (in hours) = 10
Test Case preparation productivity = 240/10 = 24 test cases/hour
Check below video to see “Test Metrics in Software Testing”
#1.2. Test Design Coverage
It helps to measure the percentage of test case coverage against the number of requirements
Formula:
Test Design Coverage = ((Total number of requirements mapped to test cases) / (Total number of requirements)*100
E.g.:
Total number of requirements: 100
Total number of requirements mapped to test cases: 98
Test Design Coverage = (98/100)*100 = 98%
The following are generated during the Test Execution phase of STLC:
#1.3. Test Execution Productivity
It determines the number of Test Cases that can be executed per hour
Formula:
(No of Test cases executed)/ (Effort spent for execution of test cases)
E.g.:
No of Test cases executed = 180
Effort spent for execution of test cases = 10
Test Execution Productivity = 180/10 = 18 test cases/hour
#1.4. Test Execution Coverage
It is to measure the number of test cases executed against the number of test cases planed.
Formula:
Test Execution Coverage = (Total no. of test cases executed / Total no. of test cases planned to execute)*100
E.g.:
Total no. of test cases planned to execute = 240
Total no. of test cases executed = 160
Test Execution Coverage = (180/240)*100 = 75%
#1.5. Test Cases Passed
It is to measure the percentage no. of test cases passed
Formula:
Test Cases Pass = (Total no. of test cases passed) / (Total no. of test cases executed) * 100
E.g.:
Test Cases Pass = (80/90)*100 = 88.8 = 89%
#1.6. Test Cases Failed
It is to measure the percentage no. of test cases failed
Formula:
Test Cases Failed = (Total no. of test cases failed) / (Total no. of test cases executed) * 100
E.g.:
Test Cases Failed= (10/90)*100 = 11.1 = 11%
#1.7. Test Cases Blocked
It is to measure the percentage no. of test cases blocked
Formula:
Test Cases Blocked = (Total no. of test cases blocked) / (Total no. of test cases executed) * 100
E.g.:
Test Cases Blocked = (5/90)*100 = 5.5 = 6%
Check below video to see “Test Metrics”
#2. Product Metric
Software Test Metrics used in the process of defect analysis phase of STLC.
#2.1. Error Discovery Rate
It is to determine the effectiveness of the test cases.
Formula:
Error Discovery Rate = (Total number of defects found /Total no. of test cases executed)*100
E.g.:
Total no. of test cases executed = 240
Total number of defects found = 60
Error Discovery Rate = (60/240)*100 = 25%
2.2. Defect Fix Rate
It helps to know the quality of a build in terms of defect fixing.
Formula:
Defect Fix Rate = (Total no of Defects reported as fixed - Total no. of defects reopened) / (Total no of Defects reported as fixed + Total no. of new Bugs due to fix)*100
E.g.:
Total no of defects reported as fixed = 10
Total no. of defects reopened = 2
Total no. of new Bugs due to fix = 1
Defect Fix Rate = ((10 – 2)/(10 + 1))*100 = (8/11)100 = 72.7 = 73%
#2.3. Defect Density
It is defined as the ratio of defects to requirements.
Defect density determines the stability of the application.
Formula:
Defect Density = Total no. of defects identified / Actual Size (requirements)
E.g.:
Total no. of defects identified = 80
Actual Size= 10
Defect Density = 80/10 = 8
#2.4. Defect Leakage
It is used to review the efficiency of the testing process before UAT.
Formula:
Defect Leakage = ((Total no. of defects found in UAT)/(Total no. of defects found before UAT)) * 100
E.g.:
No. of defects found in UAT = 20
No. of Defects found before UAT = 120
Defect Leakage = (20 /120) * 100 = 16.6 = 17%
#2.5. Defect Removal Efficiency
It allows us to compare the overall (defects found pre and post-delivery) defect removal efficiency
Formula:
Defect Removal Efficiency = ((Total no. of defects found pre-delivery) /( (Total no. of defects found pre-delivery )+ (Total no. of defects found post-delivery)))* 100
E.g.:
Total no. of defects found pre-delivery = 80
Total no. of defects found post-delivery = 10
Defect Removal Efficiency = ((80) / ((80) + (10)))*100 = (80/90)*100 = 88.8 = 89%
Here I have hand-picked few posts which will help you to learn more interview related stuff:
- Explain Test Automation Framework
- Test Automation Framework Interview Questions
- TestNG Interview Questions
- SQL Interview Questions
- Manual Testing Interview Questions
- Agile Interview Questions
- Why You Choose Software Testing As A Career
- General Interview Questions
If you have any more questions, feel free to ask via comments. If you find this post useful, do share it with your friends on Social Networking.