Main Content

Requirements Traceability

Link requirements to designs, code, and tests, specify relationships, add markup, review traceability to models and code, check consistency

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 EditorCreate and edit requirements

Tools

Profile EditorCreate and manage profiles with stereotypes and properties (Since R2019a)

Classes

slreq.LinkSet Work with link sets
slreq.Link Work with link objects

Objects

slreq.TextRangeLine range (Since R2022b)

Methods

setDestination Set requirement link destination
setSource Set requirement link source

Functions

slreq.clearClear requirements and links from memory
slreq.closeRequirementsManagerClose Requirements Manager app in model (Since R2021a)
slreq.cmConfigureVersionSet version of linked requirements documents (Since R2019b)
slreq.cmGetVersionGet configured version of linked requirements documents (Since R2019b)
slreq.createLinkCreate traceable links
slreq.createTextRangeCreate line ranges (Since R2022b)
slreq.findFind requirement, reference, and link set artifacts
slreq.getDependentLinkSetsRetrieve link sets with incoming links to requirement set (Since R2023a)
slreq.getIncomingLinkTypeLabelRetrieve incoming link type label (Since R2023a)
slreq.getOutgoingLinkTypeLabelRetrieve outgoing link type label (Since R2023a)
slreq.generateTraceabilityDiagramCreate a traceability diagram (Since R2021b)
slreq.generateTraceabilityMatrixCreate traceability matrix (Since R2021a)
slreq.getExternalURLGet navigation URL for link source or destination, requirement, test or Simulink model element (Since R2021a)
slreq.getTextRangeGet line ranges (Since R2022b)
slreq.getTraceabilityMatrixOptionsCreate options structure for traceability matrix (Since R2021a)
slreq.inLinksGet incoming links for requirement or other linkable item
slreq.loadLoad requirement set or link set
slreq.openRequirementsManagerOpen Requirements Manager app in model (Since R2021a)
slreq.outLinksGet outgoing links for a block or other linkable item
slreq.refreshCustomizationsRegister Requirements Toolbox customizations (Since R2022a)
slreq.showNavigate to link source or destination (Since R2020a)
slreq.structToObjConvert link source or destination information from structure to model object type

Topics

Create Links

Trace Requirements to Generated Code

Visualize, Manage, and Troubleshoot Links

Link with Third-Party Applications