Component Breakdown
R2026bMetric ID
modeltesting.ComponentBreakdown[project.ComponentBreakdown]
Description
This metric returns a summary of test statuses, model coverage, and requirements traceability for each component in the project. Each entry in the result corresponds to one component and includes the number of tests and the fraction of passed tests for model, software-in-the-loop (SIL), and processor-in-the-loop (PIL) testing.
Use this metric to get an overview of the model testing, coverage, and requirements linkages across the components in your project.
Supported Artifacts
This metric collects results at the project level and returns data for each component in the project.
Collection
To collect data for this metric, execute the metric engine with the metric ID.
metric_engine = metric.Engine;
results = execute(metric_engine,"modeltesting.ComponentBreakdown[project.ComponentBreakdown]")View the metric result values.
results.Value
To collect all metrics in the modeltesting.ComponentBreakdown group at
once, use the group name with empty brackets. Use the MetricID property to
distinguish results from different metrics in the
group.
results = execute(metric_engine,"modeltesting.ComponentBreakdown[]")Results
The metric returns a single object for the project.metric.Result
The Value property returns a structure array with one entry for each
component in the project. Each structure has these fields:
Component— A structure identifying the component, with these fields:Alias— Name of the component.URI— Unique resource identifier for the component.
TestCount— Number of tests associated with the component.ModelTestingPassed— Fraction of model tests that passed for the component. Empty when no model test results are available.SILTestingPassed— Fraction of SIL tests that passed for the component. Empty when no SIL test results are available.PILTestingPassed— Fraction of PIL tests that passed for the component. Empty when no PIL test results are available.