Code Coverage

There are many different classes of code coverage. This page provides an overview of the different methods.

Hansel aims at supporting a code coverage measure, that can always be achieved. A counter example is path coverage, which in many cases cannot be achieved.

The currently implemented code coverage class is decision coverage. The difference compared to basic block coverage becomes clear, when looking at the following code fragment:

      if (a) {
          [...]
      }
    
This code should be executed (at least) twice in a test run: One time with a beeing true, one time with a beeing false. But to achieve basic block coverage it is sufficient to call the code with a beeing true.