Test Case with Requirement
Use this metric to determine whether a test is linked to a requirement with a link
where the Type is set to
Verifies. The metric
analyzes only tests that run on the model or subsystems in the unit for which you
collect metric data.
Analyzes only tests in the project that test:
Atomic subsystem references
Atomic Stateflow® charts
Atomic MATLAB® Function blocks
Counts only links where the Type is set to
Verifiesthat link to requirements where the Type is set to
Functional. This includes links to requirements that are not linked to the unit or are linked to other units. For each test that is linked to requirements, check that the links are to requirements that are implemented by the unit that the test runs on.
To collect data for this metric:
In the Model Testing Dashboard, click a metric in the Tests Linked to Requirements section and, in the table, see the Requirement Link Status column.
getMetricswith the metric ID
Collecting data for this metric loads the model file and requires a Simulink® Test™ license.
For this metric, instances of
Value as one of these logical outputs:
0— The test is not linked to requirements that are implemented in the unit.
1— The test is linked to at least one requirement with a link where the Type is set to