Supported Code Coverage Levels
Coco supports the following coverage levels:
- Function coverage
- Line Coverage
- Statement Coverage
- Decision Coverage (or Branch Coverage)
- Condition Coverage
- MC/DC – Modified Condition/Decision Coverage
- MCC – Multiple Condition Coverage
The Call Coverage metric is not explictly listed but is implicitly covered by Condition Coverage, MCC and MCC.
For easier analysis the source code is colored depending on whether a line, branch or condition is covered – or not:
See our site http://www.opencoverage.net for more sophisticated examples from real world projects.
Selecting the right level
Safety standards are a good source for selection of coverage levels that should be tracked. See Code Coverage Metrics Recommended by ISO 26262 for an example from the automotive industry.