Main Content

Link Test Items to Requirements

You establish traceability by linking requirements to other artifacts. For more information on requirement links, see Create and Store Links. If you have a Simulink® Test™ license, you can link test items to requirements. You can link to requirements from these Simulink Test items:

  • Test files

  • Test suites

  • Test cases

  • Iterations

  • Assessments

After you link the Simulink Test items, you can track changes and requirement verification status. For more information, see Track Changes to Requirement Links and Review Requirements Verification Status.

Create Links from Test Files, Test Suites, and Test Cases

You can link test files, test suites, or test cases to requirements by using the Requirements Editor:

  1. In the Test Manager, select a test file, test suite, or test case in the Test Browser.

  2. In the Requirements Editor, select a requirement.

  3. In the Requirements Editor, in the Links section of the toolstrip, click Add Links > Link from Selected Test Case. In the right pane, in the Links section, the test item appears in the Verified by section.

    The Links section of the right pane

Create Links from Test Iterations

You can link the table iterations in a test case to requirements by using the Test Manager:

  1. In the Requirements Editor, select a requirement.

  2. In the Test Manager, select a test case in the Test Browser.

  3. In the test case, expand the Iterations > Table Iterations section. To add the Requirements column, click the Plus icon in the upper-right corner of the table and select Requirements.

    Table iterations column display options. The Description and Requirements options are selected.

  4. Click the Requirement cell for the test iteration.

  5. In the Requirement Editor dialog box, click Add > Link to Selected Requirement.

    Requirement Editor dialog box. The cursor is on the Link to Selected Requirement option.

    In the Requirements Editor, in the Links section of the right pane, the iteration appears in the Verified by section.

    The Links section of the right pane

Create Links from Assessments

You can link logical or temporal assessments to requirements using the Test Manager:

  1. In the Requirements Editor, select a requirement.

  2. In the Test Manager, select a test case in the Test Browser.

  3. In the test case, expand the Logical and Temporal Assessments section. To add the Requirements column, click the Plus icon in the upper-right corner of the table and select Requirements.

    Assessment column dispaly options. The Enabled, Name and Requirements options are selected.

  4. Click the Requirement cell for the test iteration.

  5. In the Requirement Editor dialog box, click Add > Link to Selected Requirement. In the Links section of the right pane in the Requirements Editor, the assessment appears in the Verified by section.

    The Links section of the right pane

Related Examples

More About