Key Performance Indicators Examples

Test Coverage

Test coverage is a metric that measures the percentage of code that is executed during testing. It is used to measure the effectiveness of a software testing process and to identify areas of the code that may not be thoroughly tested.
The formula for test coverage is:

Test Coverage = (Number of Lines of Code Executed During Testing / Total Number of Lines of Code) * 100%

It is calculated by measuring the number of lines of code that were executed during testing and dividing that by the total number of lines of code in the software. The result is then multiplied by 100% to express the result as a percentage.

For example, if a software has 1000 lines of code and 800 lines of code were executed during testing, the test coverage would be 80%.

It’s important to track the test coverage over time, compare it against industry benchmarks, and track it by different segments, such as by different teams, products, or customers, in order to identify where the problem is and take action to increase the test coverage.

There are different types of test coverage, such as statement coverage, branch coverage, and condition coverage, each of them measures different aspects of the code, and it’s important to understand which one is more relevant for the specific use case.

It’s also important to keep in mind that test coverage is not the only metric that should be used to measure the effectiveness of the testing process, it’s just one of the many metrics that should be used in conjunction with other metrics such as the number of defects found, the test coverage by different types of tests, and the test coverage by different parts of the codebase.

Measure what matters for your business with KPIs

Track business performance with real time key metrics against targets in one place without the need for multiple dashboards or reports