Main Content

Model Coverage Breakdown

Metric ID

slcomp.mt.CoverageBreakdown

Description

This metric returns the coverage measured in the model test results, aggregated across each of the models in the unit. The metric result includes the percentage of coverage achieved by the model tests, the percentage of model coverage justified in coverage filters, and the percentage of coverage missed by the model tests.

Computation Details

The metric:

  • Returns aggregated coverage results.

  • Does not include coverage from tests that run in software-in-the-loop (SIL) or processor-in-the-loop (PIL) mode.

  • Returns 100% coverage for models that do not have coverage points.

Collection

Use getMetrics with the metric ID slcomp.mt.CoverageBreakdown.

Collecting data for this metric loads the model file and test results files and requires a Simulink® Coverage™ license.

Results

For this metric, instances of metric.Result return the Value as a struct that contains fields for:

  • Execution — Aggregated execution coverage for the unit

  • Decision — Aggregated decision coverage for the unit

  • Condition — Aggregated condition coverage for the unit

  • MCDC — Aggregated modified condition and decision coverage (MC/DC) for the unit

  • OverflowSaturation — Aggregated saturate on integer overflow coverage for the unit

Each field contains a struct that contains these fields:

  • Achieved — The percentage of coverage achieved by the model tests.

  • Justified — The percentage of model coverage justified by coverage filters.

  • Missed — The percentage of coverage missed by the model tests.

  • AchievedOrJustified — The percentage of coverage achieved by the model tests or justified by coverage filters.

Compliance Thresholds

The default compliance thresholds for this metric are:

  • Compliant — Test results return 0% missed coverage

  • Non-Compliant — Test results return missed coverage

  • Warning — None

See Also

Related Topics