Hauptinhalt

SIL Coverage Breakdown

R2026b
Since R2023a

Metric ID

slcomp.sil.CoverageBreakdown

Description

This metric returns the coverage measured in the software-in-the-loop (SIL) test results, aggregated across the unit. The metric result includes the percentage of coverage achieved by tests run in SIL mode, the percentage of coverage justified in coverage filters, and the percentage of condition coverage missed by tests run in SIL mode.

Supported Artifacts

This metric collects metric results for Units in the project. To control what the dashboard classifies as a unit, see Categorize Models in Hierarchy as Components or Units.

Computation Details

The metric:

  • Returns aggregated coverage results.

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

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

Collection

To collect metric results, execute the metric engine using the metric ID.

metricEngine = metric.Engine;
metricResults = execute(metricEngine,"slcomp.sil.CoverageBreakdown")

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

Results

This metric returns an array of metric.Result objects. Each result contains a Value property with coverage results and supporting information.

Coverage Results

The Value property contains these coverage fields:

  • Statement — Aggregated statement coverage

  • Decision — Aggregated decision coverage

  • Condition — Aggregated condition coverage

  • MCDC — Aggregated modified condition/decision coverage (MC/DC)

  • Function — Aggregated function coverage

  • FunctionCall — Aggregated function call coverage

Each coverage field contains the same set of subfields:

Field NameDescription
Achieved

Percentage of coverage achieved by tests run in SIL mode

Justified

Percentage of SIL coverage justified by coverage filters

Missed

Percentage of coverage missed by tests run in SIL mode

AchievedOrJustified

Percentage of coverage achieved by tests run in SIL mode or justified by coverage filters

SatisfiedOutcomes

Number of coverage outcomes satisfied by tests run in SIL mode

JustifiedOutcomes

Number of SIL coverage outcomes justified by coverage filters

TotalOutcomes

Total number of SIL coverage outcomes

Supporting Information

In addition to the coverage results, the Value property also contains supporting information:

  • TestResults — Test results that contributed to the coverage, returned as a structure with fields:

    • Alias — Test result name

    • URI — Digital thread identifier

  • Fragments — Model information and coverage outcomes, returned as a structure with fields:

    • Model — Model information, returned as a structure with fields:

      • Alias — Model name

      • URI — Digital thread identifier

    • Statement

    • Decision

    • Condition

    • MCDC

    • Function

    • FunctionCall

    For each coverage type, the fragment data summarizes the number of Satisfied, Justified, and Total coverage outcomes.

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

Objects

Functions

Topics