Main Content

Test Breakdown Details

R2026b
Since R2026b

Metric ID

modeltesting.TestAnalysis[slcomp.TestBreakdownDetails]

Description

This metric returns detailed information about each test in the unit, including the test type, tags, and whether the test is a component test or an independent test.

Use this metric to view meta information associated with test cases, including test tags and test case types.

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.TestAnalysis[slcomp.TestBreakdownDetails]")

View the metric result values for a specific unit.

results(1).Value
results(1).ScopeAlias

To collect all metrics in the modeltesting.TestAnalysis 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.TestAnalysis[]")

Results

The metric returns an array of metric.Result objects, one for each unit in the project. Use the Value property of the metric result object to view the metric result values. Use the ScopeId and ScopeAlias properties to identify which unit the result belongs to.

The ScopeAlias property returns the name of the unit.

The Value property returns a structure array with one entry for each test in the unit. If there are no tests, the value is missing. Each structure has these fields:

  • ComponentTest — Whether the test is a component test or an independent test. Values include 'Component' and 'Independent'.

  • Tags — Tags associated with the test. A value of '-' indicates no tags are assigned.

  • Test — A structure identifying the test, with these fields:

    • Alias — Name of the test.

    • URI — Unique resource identifier for the test.

  • Type — Type of the test case, such as 'Simulation'.

See Also

Objects

Functions

Topics