PIL Coverage Breakdown
R2026bMetric ID
slcomp.pil.CoverageBreakdown
Description
This metric returns the coverage measured in the processor-in-the-loop (PIL) test results, aggregated across the unit. The metric result includes the percentage of coverage achieved by the PIL tests, the percentage of coverage justified in coverage filters, and the percentage of coverage missed by the PIL tests.
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 software-in-the-loop (SIL) 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.pil.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 coverageDecision— Aggregated decision coverageCondition— Aggregated condition coverageMCDC— Aggregated modified condition/decision coverage (MC/DC)Function— Aggregated function coverageFunctionCall— Aggregated function call coverage
Each coverage field contains the same set of subfields:
| Field Name | Description |
|---|---|
Achieved | Percentage of coverage achieved by PIL tests |
Justified | Percentage of PIL coverage justified by coverage filters |
Missed | Percentage of coverage missed by PIL tests |
AchievedOrJustified | Percentage of coverage achieved by PIL tests or justified by coverage filters |
SatisfiedOutcomes | Number of coverage outcomes satisfied by PIL tests |
JustifiedOutcomes | Number of PIL coverage outcomes justified by coverage filters |
TotalOutcomes | Total number of PIL 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 nameURI— 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 nameURI— Digital thread identifier
StatementDecisionConditionMCDCFunctionFunctionCall
For each coverage type, the fragment data summarizes the number of
Satisfied,Justified, andTotalcoverage outcomes.
Compliance Thresholds
The default compliance thresholds for this metric are:
Compliant— Test results return0%missed coverage.Non-Compliant— Test results return missed coverage.Warning— None.