- Extract Requirements and Test References: Ensure that each test case in Simulink has a reference to the corresponding requirement in the requirements tab or section.
- Create a Traceability Matrix: Use a tool or script to extract and compile this information into a traceability matrix. This can be done manually or via automated scripts using MATLAB.
- Generate the Report: Format the extracted data into a readable report, listing each test case and the corresponding requirements it covers.
- Open Simulink Test Manager.
- Load the Simulink test file.
- Retrieve all test cases from the loaded test file.
- Create an empty list or table to store the traceability information.
- For each test case:
- Retrieve the requirement links associated with the test case.
- For each requirement link.
- Extract the requirement ID.
- Add an entry to the traceability report with the test case name and the requirement ID.
- Convert the traceability report list/table to a structured format (e.g., table).