What is Coverage measurement tools in software testing?

These tools are mostly used by developers.

Coverage tools helps in checking that how thoroughly the testing has been done.

A coverage tool first identifies the elements or coverage items that can be counted. At component testing level, the coverage items could be lines of code or code statements or decision outcomes (e.g. the True or False exit from an IF statement). At component integration level, the coverage item may be a call to a function or module.

The process of identifying the coverage items at component test level is called ‘instrumenting the code’. A set of tests is then run through the instrumented code, either automatically using a test execution tool or manually. The coverage tool then counts the number of coverage items that have been executed by the test suite, and reports the percentage of coverage items that have been tested, and may also identify the items that have not yet tested.

Features or characteristics of coverage measurement tools are as follows:

• To identify coverage items (instrumenting the code);

• To calculate the percentage of coverage items that were tested by a set of tests;’

• To report coverage items that have not been tested yet;

• To generate stubs and drivers (if part of a unit test framework).

It is very important to know that the coverage tools only measure the coverage of the items that they can identify. Just because your tests have achieved 100% statement coverage, this does not mean that your software is 100% tested!