주요 콘텐츠

Identify and Address Gaps in Requirements Traceability

This step of the example shows how to identify requirements that are not linked and create links to the code and tests that implement and verify the requirements.

Assess Requirement Verification Status

View the verification status for the requirements in the project in the Requirements section of the Code Quality Dashboard.

The Requirements section of the dashboard shows that the requirements mostly link to passing tests, though some requirements do not link to tests.

To view details about the verification status, open the requirement sets by clicking Requirements. The ecgAppReq requirement set opens in the Requirements Editor. To update the tracking and status information for the requirements, in the banner, click Analyze now.

A banner in the Requirements Editor indicates that change tracking and status information is pending. The banner has a hyperlink to run the analysis now, or you can click the Refresh button to run the analysis.

Apply the ECGClassificationView to the requirement set. In the View section, click Filter view and select ECGClassificationView (ecgAppReq).

The mouse points to the ECGClassificationView view in the Filter View menu.

The Content column shows the requirement summary and description, and the Links column displays the requirement links. The Verified column shows the verification status of the requirements based on the test results of the linked tests.

The Requirements Editor shows the parent requirements. Some link to passing tests and some have child requirements that do not link to tests.

To show the child requirements, expand the parent requirements.

Identify Unlinked Requirements and Create Links

You can identify unlinked requirements when the Links column is empty. For example, requirement 2.4 is unlinked.

This requirement says that the heart rate calculation algorithm must be exported as a static C library, and specifies the required error tolerance between the result of executing the library and executing the MATLAB® code. The Links column for this row is empty, which indicates that the requirement is unlinked.

The Requirements Editor shows that requirement 2.4 is unlinked

The breathRateEquivalenceTest.m test class implements and verifies this requirement. Open the file.

open("breathRateEquivalenceTest.m")

The generateCode function in line 17 generates the static C library. Select the code in line 17.

The generateCode function from the breathRateEquivalenceTest.m file is shown, which spans lines 17 through 26.

Create the implementation link. In the Requirements Editor, select requirement 2.4, then click Add Links > Link from Selection in MATLAB Editor. The Links column displays an Implementation link to the generateCode function.

The breathRateEquivalenceTest.m test class also tests the static C library for equivalence with the MATLAB® code. To link the requirement to the test, use the MATLAB Test Manager to create the link:

  1. In the Requirements Editor, select requirement 2.4.

  2. In the Code Quality Dashboard, open the MATLAB Test Manager by clicking Tests.

  3. Right-click testsEquivalence/breathRateEquivalenceTest.m and select Requirements > Link to Selection in Requirements Browser.

The breathRateEquivalence test in the MATLAB Test Manager shows that the tests in the class passed, and the mouse points to the requirements column which indicates that there is a link to requirement 2.4.

The Requirements column displays the link to requirement 2.4. Navigate to the requirement by clicking the hyperlink.

The mouse points to the verified column for requirement 2.4. The tooltip indicates that it links to a test that passed.

Because the breathRateEquivalenceTest class ran and passed, the Verified column is green, and the tooltip indicates that the requirement links to a test that passed.

See Also

Apps

Topics