Main Content

Test Status Distribution for PIL Mode

R2026b
Since R2026b

Metric ID

modeltesting.pil.TestResultAnalysis[slcomp.TestStatusDistribution]

Description

This metric returns the distribution of test result statuses for processor-in-the-loop (PIL) mode tests in each unit. Each status category reports the number of tests with that status.

Use this metric to assess the overall status of PIL tests in the unit.

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.

Collection

To collect data for this metric, execute the metric engine with the metric ID.

metric_engine = metric.Engine;
results = execute(metric_engine,"modeltesting.pil.TestResultAnalysis[slcomp.TestStatusDistribution]")

View the metric result values.

results(1).Value

To collect all metrics in the modeltesting.pil.TestResultAnalysis group at once, use the group name with empty brackets.

results = execute(metric_engine,"modeltesting.pil.TestResultAnalysis[]")
Use the MetricID property to distinguish results from different metrics in the group.

Results

The metric returns a metric.Result object for each unit in the project.

The Value property returns a structure with these fields:

  • Total — Total number of PIL tests for the unit.

  • Failed — Number of PIL tests that failed.

  • Passed — Number of PIL tests that passed.

  • Disabled — Number of PIL tests that are disabled.

  • NotRun — Number of PIL tests that have not been run. A test has a status of not run when there is no test result available for the test.

  • Untested — Number of PIL tests that ran, but no verification was performed. This occurs if no verify statements or other criteria were specified, or if the criteria were specified but not executed.

See Also

Objects

Functions

Topics