Test Metrics in Software Testing: Types and Examples

By Vijay

By Vijay

I'm Vijay, and I've been working on this blog for the past 20+ years! I’ve been in the IT industry for more than 20 years now. I completed my graduation in B.E. Computer Science from a reputed Pune university and then started my career in…

Learn about our editorial policies.
Updated October 19, 2026

Today in this article, we will see Software Test Metrics and Measurements with examples and graphs, along with the uses of these concepts in the process of Software Testing.

Test metrics in software testing are essential for QA teams to determine the status of testing, to know the software quality, and to determine the presence of defects and make decisions about releasing the software. With the help of these metrics, one can be aware of what amount of testing is completed, how many tests were passed or failed, and what kind of quality issues are there.

In this article, we will cover different test metrics in software testing, common metrics with formulas, calculation examples of metrics, and usage of these measurements for testing..

What are test metrics in software testing?

Software Test Metrics and Measurements

Test metrics in software testing are quantitative tools for monitoring and evaluating the progress, quality, and performance of a software testing effort. These metrics help engineering and QA teams assess test execution status and stability of the product under development.

Raw Measurements vs. Calculated Metrics

To understand software testing data, it is necessary to differentiate between data points and metrics:

  • Raw Measurement: The initial data point obtained during software testing that does not involve any calculations. It allows answering basic questions “How many?” and “How much?”
  • Example: Recording exactly 450 test cases executed, or 50 bugs found.
  • Calculated Metric: A derived value computed by combining two or more raw measurements using a mathematical formula. It adds context, enabling teams to benchmark performance, track trends, and make comparative evaluations.
    • Example: Dividing the 450 executed test cases by the 500 total planned test cases to yield a Test Execution Rate of 90.0%.

Example of Simple Metrics

  • Raw data: The testers from your team executed 450 tests out of 500 that were planned to be run, and they found 45 defects. Just as such values can be treated separately, they provide information about activity volume.
  • Metric conversion: Using certain formulas, these raw figures can be converted into meaningful metrics like Execution Rate = 90%, Defect Density = 3 defects/KLOC.

Software Testing Metrics and measurements

Suppose “Kilogram” is a metric for measuring the attribute “Weight”. Similarly, in software, “How many issues are found in a thousand lines of code?”, here the number of issues is one measurement & No. of lines of code is another measurement. Metric is defined from these two measurements.

Test metrics example:

  • How many defects exist within the module?
  • How many test cases are executed per person?
  • What is the Test coverage %?

Common Test Metrics & Formulas Quick Reference

Metric NameDescriptionFormula
Test Case Execution RateMeasures the progress of test execution over time.(“Number of Test Cases Executed” /”Total Number of Test Cases Planned” )
Test Pass RateIndicates the quality and stability of the build.(“Number of Passed Tests” /”Total Number of Tests Executed” )Ă—100
Test Failure RateHighlights areas of instability or high defect density.(“Number of Failed Tests” /”Total Number of Tests Executed” )Ă—100
Defect DensityMeasures the quality of a module or component by tracking bugs per size.“Total Number of Defects Found” /”Size of Module (KLOC or Function Points)”
Defect Leakage RateShows the effectiveness of testing before releasing to production.(“Number of Bugs Found in Production” /”Total Number of Bugs Found (Pre + Post-Release)” )Ă—100
Defect Rejection RateReflects alignment and clarity between requirements and QA understanding.(“Number of Rejected Defects” /”Total Number of Defects Raised” )Ă—100
Test CoverageMeasures how thoroughly the code or requirements are tested.(“Requirements / Code Covered” /”Total Requirements / Code Items” )Ă—100
Mean Time to Detect (MTTD)Average time taken to discover a defect or failure after it occurs.“Total Time Taken to Detect Failures” /”Total Number of Failures”
Mean Time to Repair (MTTR)Average time taken to fix a reported defect and deploy the fix.“Total Downtime / Repair Time” /”Total Number of Repairs”

What is Software Test Measurement

Measurement indicates the extent, amount, dimension, capacity, or size of some attribute of a product or process.

Test Measurement example: Total number of defects.

Please refer below diagram for a clear understanding of the difference between Measurement & Metrics.

difference between Measurement & Metrics

Why Are Test Metrics Important?

Generation of Software Test Metrics is the most important responsibility of the Software Test Lead/Manager.

Test Metrics are used to,

  1. Decide for the next phase of activities, such as estimating the cost & schedule of future projects.
  2. Understand the kind of improvement required to succeed in the project.
  3. Decide on the Process or Technology to be modified, etc.

Importance of Software Testing Metrics:

As explained above, Test Metrics are the most important to measure the quality of the software.

Now, how can we measure the quality of the software by using Metrics?

Suppose, if a project does not have any metrics, then how will the quality of the work done by a Test Analyst will be measured?

For Example, A Test Analyst has to,

  1. Design the test cases for 5 requirements.
  2. Execute the designed test cases.
  3. Log the defects & need to fail the related test cases.
  4. After the defect is resolved, we need to re-test the defect & re-execute the corresponding failed test case.

In the above scenario, if metrics are not followed, then the work completed by the test analyst will be subjective, i.e. the Test Report will not have the proper information to know the status of his work/project.

If Metrics are involved in the project, then the exact status of his/her work with proper numbers/data can be published.

i.e. in the Test Report, we can publish:

  1. How many test cases have been designed per requirement?
  2. How many test cases still need to be designed?
  3. How many test cases are executed?
  4. How many test cases are passed/failed/blocked?
  5. How many test cases have not been executed yet?
  6. How many defects are identified & what is the severity of those defects?
  7. How many test cases are failed due to one particular defect? etc.

Based on the project needs, we can have more metrics than the above list, to know the status of the project in detail.

The Test Lead/Manager will gain insight into the key points mentioned below based on the provided metrics.

  • Percentage of work completed.
  • Percentage of remaining work.
  • Time to complete the remaining work.
  • Whether the project going as per the schedule or lagging? etc.

If the project does not meet the timeline, the manager will inform the client and other stakeholders, providing reasons for the delay in preventing any last-minute surprises.

Metrics Life Cycle

Metrics Life Cycle

Types of Manual Test Metrics

Testing Metrics are mainly divided into 2 categories.

  1. Base Metrics
  2. Calculated Metrics

Base Metrics: Base Metrics are the Metrics that are derived from the data gathered by the Test Analyst during the test case development and execution.

This data will be tracked throughout the Test Lifecycle. I.e. collecting the data like the Total no. of test cases developed for a project (or) no. of test cases that need to be executed (or) no. of test cases passed/failed/blocked, etc.

Calculated Metrics: Calculated Metrics are derived from the data gathered in Base Metrics. These Metrics are tracked by the test lead/manager for Test Reporting purposes.

Examples of Software Testing Metrics

Let’s take an example to calculate various test metrics used in software test reports:

Below is the table format for the data retrieved from the Test Analyst who is involved in testing:

Example of Software Testing Metrics

Definitions and Formulas for Calculating Metrics:

#1) Test cases executed (%ge): This metric determines the percentage of test cases that have been executed.

%ge Test cases Executed = (No. of Test cases executed / Total no. of Test cases written) * 100.

So, from the above data,
%ge Test cases Executed = (65 / 100) * 100 = 65%

#2) Test cases not executed (%ge): This metric is used to obtain the pending execution status of the test cases in terms of %ge.

%ge Test cases not executed = (No. of Test cases not executed / Total no. of Test cases written) * 100.

So, from the above data,
%ge Test cases Blocked = (35 / 100) * 100 = 35%

Test metrics graph 1
Test metrics graph 2

#3) Test cases Passed (%ge): This metric is used to obtain the Pass %ge of the executed test cases.

%ge Test cases Passed = (No. of Test cases Passed / Total no. of Test cases Executed) * 100.

So, from the above data,
%ge Test cases Passed = (30 / 65) * 100 = 46%

#4) Test cases Failed (%ge): This metric is used to obtain the Fail %ge of the executed test cases.

%ge Test cases Failed = (No. of Test cases Failed / Total no. of Test cases Executed) * 100.

So, from the above data,
%ge Test cases Passed = (26 / 65) * 100 = 40%

#5) Test cases Blocked: This metric is used to obtain the blocked %ge of the executed test cases. A detailed report can be submitted by specifying the actual reason for blocking the test cases.

%ge Test cases Blocked = (No. of Test cases Blocked / Total no. of Test cases Executed) * 100.

So, from the above data,
%ge Test cases Blocked = (9 / 65) * 100 = 14%

Test metrics graph 3
Test metrics graph 4

#6) Defect Density = No. of Defects identified / size

(Here “Size” is considered a requirement. Hence, here the Defect Density is calculated as several defects identified per requirement. Similarly, Defect Density can be calculated as some Defects identified per 100 lines of code [OR] No. of defects identified per module, etc.)

So, from the above data,
Defect Density = (30 / 5) = 6

#7) Defect Removal Efficiency (DRE) = (No. of Defects found during QA testing / (No. of Defects found during QA testing + No. of Defects found by End-user)) * 100

DRE is used to identify the test effectiveness of the system.
Suppose, During Development & QA testing, we have identified 100 defects.
After the QA testing, during Alpha & Beta testing, the end-user / client identified 40 defects, which could have been identified during the QA testing phase.

Now, The DRE will be calculated as,
DRE = [100 / (100 + 40)] * 100 = [100 /140] * 100 = 71%

#8) Defect Leakage: Defect Leakage is the Metric that is used to identify the efficiency of the QA testing i.e., how many defects are missed/slipped during the QA testing.

Defect Leakage = (No. of Defects found in UAT / No. of Defects found in QA testing.) * 100

Suppose, During Development & QA testing, we have identified 100 defects.
After the QA testing, during Alpha & Beta testing, the end-user / client identified 40 defects, which could have been identified during the QA testing phase.

Defect Leakage = (40 /100) * 100 = 40%

#9) Defects by Priority: This metric is used to identify the no. of defects identified based on the Severity / Priority of the defect which is used to decide the quality of the software.

%ge Critical Defects = No. of Critical Defects identified / Total no. of Defects identified * 100
From the data available in the above table,
%ge Critical Defects = 6/ 30 * 100 = 20%

%ge High Defects = No. of High Defects identified / Total no. of Defects identified * 100
From the data available in the above table,
%ge High Defects = 10/ 30 * 100 = 33.33%

%ge Medium Defects = No. of Medium Defects identified / Total no. of Defects identified * 100
From the data available in the above table,
%ge Medium Defects = 6/ 30 * 100 = 20%

%ge Low Defects = No. of Low Defects identified / Total no. of Defects identified * 100
From the data available in the above table,
%ge Low Defects = 8/ 30 * 100 = 27%

Defects by Priority

Recommended reading => How to Write an Effective Test Summary Report

Why High Pass Rates and Low Defect Counts Are Misleading

Over-reliance on high testing pass rates or defect counts generates a false sense of safety. Absent appropriate context, such measures tend to mask quality problems instead of proving the software’s readiness.

Pitfalls of a High Pass Rate

  • Incomplete Testing: A 100% pass rate does not mean much if testing has been done for just the happy paths or trivial user interface while all the business logic remains untested.
  • Poor Quality of Assertions: Testing scenarios that lack any assertions will always pass but will not prove if the output from the system is right.
  • Obsolute Tests: If old tests that do not take into account the latest changes in terms of user interaction or the features remain passed, this makes one believe in a stable system.

The Pitfalls of a Low Defect Count

  • Lax Test Quality: The occurrence of few bugs indicates that the test is not comprehensive enough or does not include exploratory testing or testing for corner cases.
  • Ambiguous Requirements: In case the original requirements are vague, QA team members will not be able to recognize what can be classified as a bug due to lack of understanding of what is expected from the system.
  • Testing Not Conducted Fully: In case testing was not fully conducted because some testing cycles were skipped, then fewer bugs are found

How to Choose and Use the Right Test Metrics

Selecting appropriate metrics needs to move away from vanity metrics and focus only on data that provides key insights for decision making regarding project critical areas, potential risks, and business goals.

1. Align Metrics with Project Objectives

All measures should be related to specific goals of your project. Adapt your decision to what motivates you:

  • Velocity & Responsiveness (CI/CD / High-Frequency Sprints): Consider velocity & responsiveness measures like Test Execution Rate, Automation Pass Rate, and Mean Time to Repair (MTTR) to avoid the potential decrease in quality of rapid releases.
  • Critical Safety & Compliance (FinTech, Healthcare, Enterprises): Consider measures like Defect Leakage Rate, Defect Density, and Requirements Test Coverage.

2. Determine Priorities for Metrics Considering Project Risks Choose metrics that directly target the riskiest elements in your project:

  • Outdated or Complicated Code Bases: Focus on Defect Density and component pass rates to find unstable components that need to be refactored or thoroughly tested.
  • Short Time Lines and Limited Resources: Monitor Test Execution Rate and Defect Rejection Rate to find potential bottlenecks related to blocked test environments or incorrect requirements leading to invalid bugs reports.

3. Make Sure That Every Metric Informs Decisions Define the decision that should be taken based on each metric before you add it to the dashboard/report:

  • When Test Pass Rate falls below 80%: The decision to take is to stop deployments and hold a bug triage meeting with the development team.
  • When Defect Leakage Rate increases: The decision to take is to conduct a review of pre-production testing coverage and include the missed edge cases in future sprints.

Implementation Best Practices

  • Keep Your Dashboards Small: It is always more useful to track 5 to 7 metrics rather than bombarding users with 25 charts.
  • Give Context: It is always wise to give data context. For example, the same low pass rate will have very different reasons if it was due to an unstable testing environment rather than regressions.

Frequently Asked Questions

1. What are the Most Important Test Metrics

The key metrics to measure the quality of the software and testing process progress are the following:
 • Execution and Pass/Fail Rates: Provide information on overall testing progress and build stability.
• Defect Density: Estimates code quality by measuring the quantity of bugs per unit of code (e.g. per KLOC).
• Defect Leakage Rate: Measures the effectiveness of QA by calculating the number of defects that get out of QA.
• Defect Rejection Rate: Shows the correlation between the requirement analysis and development/testing process.
• Test Coverage: Indicates the level of testing of either code paths or business requirements.
• Time to Detect/Time to Repair (MTTD and MTTR).
 

2. Difference Between Test Measurements and Test Metrics

• Raw Measurement: A measurement value obtained in a raw form, without any computation through a simple count of the data (such as calculating the number of 450 tests conducted or the number of 50 bugs found).
• Computed Metrics: Computed value from a formula made up of at least two measurements (such as the ratio of executed tests to planned tests giving us an execution rate of 90%).

3. Calculating Test Execution Rate

“Test Execution Rate”=(“Number of Test Cases Executed” /”Total Number of Test Cases Planned” )Ă—100

4. Difference Between Test Coverage and Test Execution Rate

• Test Coverage indicates coverage in terms of breadth and depth – analyzing how much of the software code base, functionality, or business requirements have been covered through testing.
• Test Execution Rate indicates the pace of testing activity – counting the number of test cases that were planned to be executed within a particular cycle and how many of them were really executed.

5. How Test Metrics Determine Release Readiness

Test metrics eliminate the guesswork from release decisions by providing objective measures of the state of the software:
• Testing Completion Verification: A test execution ratio of 95 percent or above indicates that the test cycle that has been designed for completion has been executed successfully.
• Stability Verification: Test metrics such as high pass ratios and low defect leakage ratios indicate stability of the build.
• Risk Management: Open defect severity and defect density measure can help determine whether the open defects can be accepted or must stop the release.

Conclusion

Test metrics in software testing play an important role in helping Quality Assurance teams measure testing progress, software quality, defects, and release readiness. Metrics like test execution rate, pass rate, test coverage, defect density, and defect leakage can give valuable information about testing processes.

Yet, metrics become meaningful only if they are calculated properly and interpreted in the proper context. The fact that test pass rate is high does not guarantee that there are no defects in the application, and a small number of defects does not necessarily prove good software quality.

For getting maximum benefit out of test metrics, you should select appropriate metrics that suit your project objectives, devise a proper method of calculating those metrics, and then use these metrics for risk assessment and improving your testing process. The objective of using metrics is not the collection of maximum number of metrics; rather, it is the wise use of metrics.

The metrics provided in this article are majorly used for generating the Daily/Weekly Status report with accurate data during the test case development/execution phase & this is also useful for tracking the project status & Quality of the software.

About the author: This is a guest post by Anuradha K. She has 7+ years of software testing experience and currently working as a consultant for an MNC. She also has good knowledge of mobile automation testing.

Which other test metrics do you use in your project? As usual, let us know your thoughts/queries in the comments below.

Was this helpful?

Thanks for your feedback!

Recommended Reading

  • Meta Data in ETL

    This Tutorial Explains The Role of Metadata in ETL, Examples & Types of Metadata, Metadata Repository & Challenges in Metadata Management: Data Mart in ETL was explained in detail in our previous tutorial. The concept of Metadata is very important in ETL and this tutorial will explain all about Metadata.…

  • Data Driven and Hybrid Frameworks

    We are working our way through figuring out how to derive an Automation Framework that works best for a certain testing project and also defining certain frameworks that already exist. The example that we were using in the previous QTP framework article was creating a new Gmail account. To start…

  • Software Testing Life Cycle (STLC)

    Software Testing: In this tutorial, we discuss the Evolution of Software Testing, the Software Testing Life Cycle, and the various phases involved in STLC. 8 Phases of Software Testing Life Cycle (STLC) Evolution: 1960’s Trend: 1990’s Trend 2000’s Trend: The trend and competency of testing are changing. Testers are now…

  • Software Testing Course Syllabus (1)

    Software Testing Course Syllabus and Training Plan Week 1 Brief introduction to software systems and SDLC Basic concepts Basic Testing Vocabulary Quality Assurance versus Quality Control The Cost of Quality Software Quality Factors How Quality is Defined Why Do We Test Software? What is a Defect? The Multiple Roles of…


READ MORE FROM THIS SERIES:



53 thoughts on “Test Metrics in Software Testing: Types and Examples”

  1. Thanks for your post.
    There are more metrics used in our project. I am listing few of them,

    Requirement/Usecase Coverage
    Test case/Script design productivity
    Test case/Script execution productivity
    Test Effectiveness
    Cost Of Quality (COQ)
    Effort Variance
    (Overall and Variance at each milestone)
    Schedule variance

    Reply
  2. @ All

    Does any one have a sample excel sheet where we show all the defect details and test case reports in the call or to the client in the form of Graph or Pie chart( with formula based in excel sheet).If any please share

    Reply
  3. Hi,

    It’s something i really want to learn. But at present i am leading a project where test cases creation and execution were not used.

    So please suggest me how to create test metrics based on number issue found and number of issues closed/reopened.

    Thanks

    Reply
  4. In my opinion, difference between metrics and measurements is described quite messy in the article.

    “Suppose, in general, “Kilogram” is a metric for measuring the attribute “Weight””
    –Kilogram is rather measurement, than metric (which is also shown in Measurement & Metrics diagram, where Km and Hours are measurements).

    All 13 testing metrics in example table are rather measurements.

    Reply
  5. If I consider the re-execution of the test cases due to failure rate, how does the calculations go for these metrics, especially when you are calculating the

    – %age of Test Cases Failed or Passed

    Reply
  6. Just came across this post, pertaining to comments..
    @rajeshri : i have been working for UHG in bangalore, Its a brilliant company to work(Fortune14). They provide you with plenty of WFH. I have been working as QA TL, I used to work from my home(Chennai) 2weeks everymonth.

    Reply
  7. @Dipankar: It is obvious. DRE should be higher, it should be nearly 100%. If it is 100% then it represents testing is carried our perfectly hence there’s no UAT defects/Customer issues.

    DRE should be higher and Defect Density should be lower(viz good for entire project)

    Reply
  8. The difference between metrics and measurement is simply. Metrics are mathematical (quantifiable), and can have a number applied to them. Measurement is the larger body, that contains metrics among other things. Measurement, therefore is both qualitative and quantitative. Metrics resides within measurement, but measurement also includes the qualifiable (tall, red, married, etc.) – values that do not have an associative number value, like metrics do.

    Reply
  9. in my opinion; indians fit to do the back-house-keeping job, because any client is not a native, we all work for the testing part of it, and all these metrics or so what ever! is just to swipe out interview process, or to protect their seat!, further once working for a PMO client, one of the super manager asked why some one do these activities, when its already planned by the PMO; all job is to regress test or re-test or capture defect in the client specified tool or xls ; report the status of defects, well testing never evolves because actual QA lies in the core industries and s/w is just naive or nothing!

    Reply
  10. Hi Anuradha/Vijay thank you so much for this post. Can you please also share how to import the status directly from the HP QC, in the earlier tutorial of HP QC you have shared this but can you please dedicate a special write up for this test metrics and measurement in detail. At the end of the day the data’s and the presentation is the one which is going to shout loud behalf of us……:)

    Reply
  11. For those who want to have an excel template of this presentation to be able just to apply your numbers and get the results you are welcome to send me an email asking for it.

    Reply
  12. I’ve started to learn testing ..!do have a doubt where the failed test cases are 26 and blocked is 9. then how the defects can be 30?

    Reply
  13. Hello everyone . I was working as QA TL, having experience of around two and half year. Right now I m in Bangalore . Any one can suggest me company name providing work from home for manual testing
    Thanx

    Reply
  14. Hi! I like this article, may i ask the authenticity and original reference to figures used in this article? e.g. metric life cycle and especially one that show measure and metrics relationship in hierarchical tree under “What Is Software Test Measurement?” heading. Thanks for your time and efforts to compile this information.

    Reply
  15. Nice explanation.

    Can you help me? How can we map the software test metrics to software quality? Based on ISO 9126, the good characteristics of software product are functionality, usability, efficiency, reliability, maintainability and portability. Which software product quality characteristic that software test metrics measure?

    Reply
  16. Good article to understand the test metrices. Can you please provide industry standard for these metrics? It will definitely help.

    Reply
  17. Why the blocked test counted in Execution bucket, Number of tests executed should be 56 [ Test passed + test Failed], Blocked should be considered as Un executed

    Reply
  18. hi..thanks for your feedback…here in this article we have included the basic metrics used regularly in the projects…i will write detail post for project cost related metrics and metrics used in automation testing

    Reply
  19. Nice explanation on types of metrics.

    One can refer puretestingbits.blogspot.com or testingpanda.com for more testing metrics such as load factor, size variance, Quality of fixes, % Risk mitigation efficiency, Review Effficiency etc.

    Reply
  20. Metrics is some thing you derive from Measurement.
    It is like you measure for a period of time or multiple items and from the number you have collected you derive Metrics.
    Eg. People in a house are of Different Age 15, 20, 25,30, 35
    this is measurement, when you take an average of Age which will be 25 yrs(I.e (15+20+25+30+35)/5 =25), this 25 is Metrics.
    Hope my answer gives you a better understanding

    Reply
  21. Hi,
    How the estimates can be prepared before test execution starts.
    What are the points to be covered in estimation except the resource,environment.

    Reply
  22. Calculate Defect Leakage in the Design where there are:
    -15 Requirements
    -15 Review Defects
    -15 Design Review Defects
    -20 Code Review Defects which includes 10 Design related defect captured during the Code Review
    -20 System test Defect

    Reply
  23. Correction to % Test case Blocked metric:
    Denominator should be Total no. of Test cases written or in scope. Pass and Fail only will account for Executed. If the test case is blocked, obviously, it cannot be executed. Hence, it has to be part of un-executed.

    %ge Test cases Blocked: This metric is used to obtain the blocked %ge of the executed test cases. A detailed report can be submitted by specifying the actual reason of blocking the test cases.

    %ge Test cases Blocked = (No. of Test cases Blocked / Total no. of Test cases written) * 100.

    So, from the above data,
    %ge Test cases Blocked = (9 / 100) * 100 = 9%

    Reply
  24. How can we really use this metrics in order to improve the quality of testing? What actions we can take in order to reduce the defect density

    Reply

Leave a Comment