Requirements Traceability
Create requirement links to establish traceability to model elements, test cases, test harnesses, MATLAB® code lines, data dictionaries, Stateflow® elements, System Composer™ architecture models, and other requirements. Specify the link type to convey the nature of the relationship, such as a model element that implements a functional requirement or a test harness that verifies a test specification requirement. Create custom requirement and link types to extend the default linking capabilities.
Use the Requirements Editor to create and view links, and use the Requirements Perspective to view requirements in the model context.
Apps
Requirements Editor | Create and edit requirements |
Tools
Profile Editor | Create and manage profiles with stereotypes and properties (Since R2019a) |
Classes
slreq.LinkSet | Work with link sets |
slreq.Link | Work with link objects |
Objects
slreq.TextRange | Line range (Since R2022b) |
Methods
setDestination | Set requirement link destination |
setSource | Set requirement link source |
Functions
slreq.clear | Clear requirements and links from memory |
slreq.closeRequirementsManager | Close Requirements Manager app in model (Since R2021a) |
slreq.cmConfigureVersion | Set version of linked requirements documents (Since R2019b) |
slreq.cmGetVersion | Get configured version of linked requirements documents (Since R2019b) |
slreq.createLink | Create traceable links |
slreq.createTextRange | Create line ranges (Since R2022b) |
slreq.find | Find requirement, reference, and link set artifacts |
slreq.getDependentLinkSets | Retrieve link sets with incoming links to requirement set (Since R2023a) |
slreq.getIncomingLinkTypeLabel | Retrieve incoming link type label (Since R2023a) |
slreq.getOutgoingLinkTypeLabel | Retrieve outgoing link type label (Since R2023a) |
slreq.generateTraceabilityDiagram | Create a traceability diagram (Since R2021b) |
slreq.generateTraceabilityMatrix | Create traceability matrix (Since R2021a) |
slreq.getExternalURL | Get navigation URL for link source or destination, requirement, test or Simulink model element (Since R2021a) |
slreq.getTextRange | Get line ranges (Since R2022b) |
slreq.getTraceabilityMatrixOptions | Create options structure for traceability matrix (Since R2021a) |
slreq.inLinks | Get incoming links for requirement or other linkable item |
slreq.load | Load requirement set or link set |
slreq.openRequirementsManager | Open Requirements Manager app in model (Since R2021a) |
slreq.outLinks | Get outgoing links for a block or other linkable item |
slreq.refreshCustomizations | Register Requirements Toolbox customizations (Since R2022a) |
slreq.show | Navigate to link source or destination (Since R2020a) |
slreq.structToObj | Convert link source or destination information from structure to model object type |
Topics
Create Links
- Create and Store Links
Trace requirements to design and test items by creating links. - View and Link Requirements in Simulink
Use the Requirements Perspective to link elements in Simulink® models to requirements. - Link Test Cases to Requirements
Associate Simulink Test™ test cases with requirements. - Requirements Traceability for MATLAB Code
Associate requirements with MATLAB code and plain-text external code, such as C code. - Link from Sequence Diagrams
Create links from model elements in sequence diagrams to requirements.
Trace Requirements to Generated Code
- Requirements Traceability for Code Generated from MATLAB Code
Include comments in generated code that contain information about requirement links to MATLAB code. - Generate Code for Models with Requirements Links
Set configuration parameters so that information about requirements links is included in the generated code.
Customize Links
- Define Custom Requirement and Link Types and Properties
Customize requirements and links by using custom types and custom attributes, or stereotypes.
Visualize, Manage, and Troubleshoot Links
- Load and Resolve Links
Load link sets by loading artifacts and resolve links. - Track Requirement Links with a Traceability Matrix
Track and manage links and change issues with the Traceability Matrix. - Visualize Links with Traceability Diagrams
Visualize the traceability structure of requirements and other Model-Based Design items with traceability diagrams. - Assess Allocation and Impact
Assess the allocation of requirements and impact of changes. - Requirements Consistency Checks
Check for missing or unresolved links.
Link with Third-Party Applications
- Link to Requirements in Microsoft Word Documents
Link from requirements in a Word document to Simulink blocks. - Link to Requirements in Microsoft Excel
Create links from requirements managed in Microsoft® Excel® to design and test items in MATLAB and Simulink. - Link and Trace Requirements with IBM DOORS Next
Link to requirements in IBM® DOORS® Next. - Manage Navigation Backlinks in External Requirements Documents
Insert hyperlinks to navigate from requirements documents to model elements in Simulink.