Model Test Status
Metric ID
slcomp.mt.TestStatus
Description
This metric returns the status of the model test result. A model test can have a status of either passed, failed, disabled, not run, or untested.
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:
Includes only simulation tests in the project that test the model or subsystems in the unit for which you collect metric data.
Does not count the status of tests that run in software-in-the-loop (SIL) or processor-in-the-loop (PIL) mode. The metric shows these tests as not run.
Collection
To collect data for this metric, use the function getMetrics with
the metric ID slcomp.mt.TestStatus.
Collecting data for this metric loads the model file and test result files and requires a Simulink® Test™ license.
Results
For
this metric, instances of metric.Result return Value as a
struct with a Status field of either:
'Failed'— The test ran and returned a fail result.'Passed'— The test ran and returned a pass result.'Disabled'— The test is intentionally excluded from execution and will not run.'Not run'— The test has not run.'Untested'— The test ran, but no verification was performed. This occurs if noverifystatements or other criteria were specified, or if the criteria were specified but not executed.
Compliance Thresholds
The default compliance thresholds for this metric are:
Compliant— Each of the tests passed.Non-Compliant— One or more tests failed, have not run, are disabled, or are untested.Warning— None.