Tests in Project
Metric ID
project.mt.Tests
Description
You can use this metric to count the number of tests in the current project.
The Project Model Testing dashboard uses the results from this metric in the Tests in Project widget in the Test Status section of the dashboard.
Supported Artifacts
You can collect this metric for the Units in your project. To control what the dashboard classifies as a unit, see Categorize Models in Hierarchy as Components or Units.
Computation Details
The metric queries the digital thread to identify the Simulink® Test™ tests in the project.
Collection
To collect data for this metric, execute the metric engine and use getMetrics
with the metric ID
project.mt.Tests
.
metric_engine = metric.Engine; execute(metric_engine,"project.mt.Tests"); results = getMetrics(metric_engine,"project.mt.Tests")
Collecting data for this metric loads the model file and test result files and requires a Simulink Test license.
Results
For this metric, the function getMetrics
returns a
metric.Result
instance. Instances of metric.Result
include these properties.
Property | Description | Data Type | Example Value |
---|---|---|---|
Value | Number of tests in the project | struct |
struct with fields: Count: 48 |
Artifacts | Information about the tests in the project | struct array |
1×48 struct array with fields: UUID Name ParentUUID ParentName |
Compliance Thresholds
This metric does not have predefined thresholds.
See Also
Project Model Testing Metrics | Component Tests in Project | Summary of Model Testing Statuses for Project