menu

Some Words about Test Coverage

2 m read

0%

Automated Testing

Spread the love

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:

  • Requirement coverage is the number of requirements passed in proportion to total number of requirements. This is the dimensions to Unit Testing using traceability matrix.
  • Code Coverage is also a measure used to describe the degree to which the source code of a program has been tested by tracking untested pieces in the testing process.

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=(Lcov/Ltotal)*100%
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=(Ltc/Lcode)*100%
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.

No comments

Your comment will be shown after moderation.
Your email address will not be published.

This field is required.

Sing in to write comment

SHARE YOUR PROJECT IDEAS
Realizing the importance of providing service on agreed terms, we consider all possible risks and provide efficient solutions for all possible risks and provide efficient solutions.


Yes













Your information was successfully submitted.

  We are glad to have you with us! You'll receive an email from us shortly. Meanwhile, you can check our super-informative blog to go through the latest updates in the world of software development.Got it