Software Testing Metrics With Example
Software Testing Metrics With Example
Example
Software testing metrics are quantifiable indicators of the software testing process
progress, quality, productivity, and overall health. The purpose of software testing
metrics is to increase the efficiency and effectiveness of the software testing process
while also assisting in making better decisions for future testing by providing accurate
data about the testing process. A metric expresses the degree to which a system, system
component, or process possesses a certain attribute in numerical terms. A weekly
mileage of an automobile compared to its ideal mileage specified by the manufacturer is
an excellent illustration of metrics. Here, we discuss the following points:
1. Importance of Metrics in Software Testing.
2. Types of Software Testing Metrics.
3. Manual Test Metrics: What Are They and How Do They Work?
4. Other Important Metrics.
5. Test Metrics Life Cycle.
6. Formula for Test Metrics.
7. Example of Software Test Metrics Calculation.
Test metrics are essential in determining the software’s quality and performance.
Developers may use the right software testing metrics to improve their productivity.
Test metrics help to determine what types of enhancements are required in order to
create a defect-free, high-quality software product.
Make informed judgments about the testing phases that follow, such as project
schedule and cost estimates.
Examine the current technology or procedure to see if it need any more changes.
Manual Test Metrics: What Are They and How Do They Work?
Manual testing is carried out in a step-by-step manner by quality assurance experts. Test
automation frameworks, tools, and software are used to execute tests in automated
testing. There are advantages and disadvantages to both human and automated testing.
Manual testing is a time-consuming technique, but it allows testers to deal with more
complicated circumstances. There are two sorts of manual test metrics:
1. Base Metrics: Analysts collect data throughout the development and execution of test
cases to provide base metrics. By generating a project status report, these metrics are
sent to test leads and project managers. It is quantified using calculated metrics.
The total number of test cases
The total number of test cases completed.
2. Calculated Metrics: Data from base metrics are used to create calculated metrics.
The test lead collects this information and transforms it into more useful information for
tracking project progress at the module, tester, and other levels. It’s an important aspect
of the SDLC since it allows developers to make critical software changes.
The below diagram illustrates the different stages in the test metrics life cycle.
Test Metrics Lifecycle
To get the percentage execution status of the test cases, the following formula can be
used:
Percentage test cases executed = (No of test cases executed / Total no of test cases
written) x 100
Similarly, it is possible to calculate for other parameters also such as test cases that were
not executed, test cases that were passed, test cases that were failed, test cases that were
blocked, and so on. Below are some of the formulas:
1. Test Case Effectiveness:
Test Case Effectiveness = (Number of defects detected / Number of test cases run) x
100
2. Passed Test Cases Percentage: Test Cases that Passed Coverage is a metric that
indicates the percentage of test cases that pass.
Passed Test Cases Percentage = (Total number of tests ran / Total number of tests
executed) x 100
3. Failed Test Cases Percentage: This metric measures the proportion of all failed test
cases.
Failed Test Cases Percentage = (Total number of failed test cases / Total number
of tests executed) x 100
4. Blocked Test Cases Percentage: During the software testing process, this parameter
determines the percentage of test cases that are blocked.
Blocked Test Cases Percentage = (Total number of blocked tests / Total number
of tests executed) x 100
5. Fixed Defects Percentage: Using this measure, the team may determine the
percentage of defects that have been fixed.
Fixed Defects Percentage = (Total number of flaws fixed / Number of defects
reported) x 100
6. Rework Effort Ratio: This measure helps to determine the rework effort ratio.
Rework Effort Ratio = (Actual rework efforts spent in that phase/ Total actual efforts
spent in that phase) x 100
7. Accepted Defects Percentage: This measures the percentage of defects that are
accepted out of the total accepted defects.
Accepted Defects Percentage = (Defects Accepted as Valid by Dev Team / Total
Defects Reported) x 100
8. Defects Deferred Percentage: This measures the percentage of the defects that are
deferred for future release.
Defects Deferred Percentage = (Defects deferred for future releases / Total Defects
Reported) x 100
1 No. of requirements 5
12 Defects fixed 12
1. Percentage test cases executed = (No of test cases executed / Total no of test cases
written) x 100
= (164 / 200) x 100
= 82
2. Test Case Effectiveness = (Number of defects detected / Number of test cases run) x
100
= (20 / 164) x 100
= 12.2
3. Failed Test Cases Percentage = (Total number of failed test cases / Total number
of tests executed) x 100
= (60 / 164) * 100
= 36.59
4. Blocked Test Cases Percentage = (Total number of blocked tests / Total number
of tests executed) x 100
= (4 / 164) * 100
= 2.44
5. Fixed Defects Percentage = (Total number of flaws fixed / Number of defects
reported) x 100
= (12 / 20) * 100
= 60
6. Accepted Defects Percentage = (Defects Accepted as Valid by Dev Team / Total
Defects Reported) x 100
= (15 / 20) * 100
= 75
7. Defects Deferred Percentage = (Defects deferred for future releases / Total Defects
Reported) x 100
= (5 / 20) * 100
= 25