Coverage types

Code Coverage for Ada, C and C++

The Code Coverage feature provides the capability of reporting of various source code units and branches, depending on the coverage type selected.

By default, Code Coverage implements full coverage analysis, meaning that all coverage types are instrumented by source code insertion (SCI). However, in some cases, you might want to reduce the scope of the Code Coverage report, such as to reduce the overhead generated by SCI for example.

Branches

When referring to the Code Coverage feature, a branch denotes a generic unit of enumeration. For each branch, you specify the coverage type. Code Coverage instruments each branch when you compile the source under test.

Coverage Levels

The following table provides details of each coverage type as used in each language supported by the product

Coverage Level Languages
Block coverage C Ada C++
Call coverage C Ada
Condition coverage C Ada C++
ATC coverage Ada
Function, unit or method coverage C Ada C++
Link files Ada
Templates C++
Additional statements C Ada C++

To select a coverage level:

  1. Right-click the application or test node concerned by the Code Coverage report.

  2. From the pop-up menu, select Settings.

  3. In the Configuration list, expand Code Coverage and select Instrumentation Control.

  4. Select or clear the coverage levels as required.

  5. Click OK.

Related Topics

Source code instrumentation overview | Generating SCI Dumps | Reducing Instrumentation Overhead