Test coverage is a metric that describes to which extent your code is covered by your tests. Translated to statechart modelling, a test coverage describes which parts of your state machine were activated during test execution. This information allows to identify missing tests and thereby to increase test quality.
Whenever a test set is executed, a test coverage is computed on the fly. The test coverage metrics can be examined in the Coverage View. The coverage value is given in percent for each model element and is defined as follows:
In the following example you can see that state On has a coverage of 50%. Although it is entered by the tests, its outgoing transition On -> Off is not covered.
The coverage view contains the following toolbar buttons:
The coverage highlighting feature transports the coverage values directly onto the statechart model by coloring all elements in the colors:
You can enable the highlighting by selecting an arbitrary element in the coverage view.