Site icon TestingDocs.com

Test Coverage Metric

Overview

In this tutorial, we will learn about the software test coverage metric. It is an important metric to obtain the percentage of executed test cases of the project.

Test Coverage Metric

It is calculated as the number of test cases executed or covered vs. the total number of test cases. This metric is an indication of the completeness of the testing. It provides a clue to which extent the testing covers the product’s requirements.  Most of the time it is calculated as a Percentage.

 

Test Coverage  =

 

 

Example

Let’s take a simple example. Assume a testing project has 100 total number of testcases and 25 cases have been executed. Let’s calculate the test coverage metric.

Number of test cases executed or covered = 25

Total number of test cases of the project = 100

As per the formula:

 

Test Coverage = 

 

= 25% coverage.

Note that it does not indicate the effectiveness of the testing. Furthermore, this metric can be used as a criterion to stop testing.

Exit mobile version