Some Words about Test Coverage

TestFortExpert by TestFortExpert on 08/24/2012

Some Words about Test Coverage

Test Coverage is one of the evaluate metrics for quality testing degree. It is a useful tool for finding untested parts and active parts of the source-code.

The higher required level of test coverage, the more tests will be selected for testing test requirements or executable code.

Testing with 100% coverage is almost impossible. Thoughtful and well done testing could give a coverage percentage in the upper 80s. That’s why for test set development you should use special tools or test design techniques.

There are two methods widely applied for evaluate the quality of testing:

The difference between these two methods is in their missions: Requirement coverage checks the correspondence between set test and product requirements, while the Code coverage focused on the full testing the source code.

However, we want to show in succeeding text how exactly you can distinguish these two methods.

Requirements Coverage

You can calculate test coverage as for requirements using following formula:

Tcov: is test coverage;
Lcov: is requirement number that is checked by test code cases;
Ltotal: is total amount of requirements.

You need to analyze product requirements and divide it into paragraphs.

To optimize test coverage it is rather to use typical test design techniques.

Code coverage

Next formula defines the test coverage degree as for executed software code:

Tcov: test coverage
Ltc: number of covered by test code lines
Lcode: total amount of code lines.

You can find a lot of interesting tools like Clover, that allow you to find out which of links have being entered during the test process. So you can enhance the cover by addition of new tests for particular case and to exclude double tests.

So, the value of coverage analysis is that it helps to find which bits of your code are not tested, that could improve the quality of testing process.

We use cookies to ensure your best experience. By continuing to browse this site, you accept the use of cookies and "third-party" cookies. For more information or to refuse consent to some cookies, please see our Privacy Policy and Cookie Policy