Main Content

Requirements-Based Testing

Requirements-based model verification, interpreting and reporting test results

Set verification link types between requirements and test artifacts such as:

  • Test files, test suites, and test cases in Simulink® Test™

  • Simulink Design Verifier™ Verification blocks

  • Simulink Model Verification Library blocks

Use the Implementation status metrics to check if your requirements are implemented and address gaps in consistency. Use the Verification status metrics to check if your requirements are verified by running the tests associated with them. Review Implementation and Verification status for the requirement set in the Requirements Editor. After running tests, view a results summary and address test failures. Create justifications to exclude requirements from the Implementation and Verification status metric computation.

Classes

slreq.ReqSet Work with requirement sets
slreq.JustificationRequirement justifications
slreq.verification.services.TAP Work with external results sources (Since R2020a)
slreq.verification.services.JUnit Work with external results sources (Since R2020a)

Methods

getImplementationStatus Query requirement set implementation status summary
getVerificationStatus Query requirement set verification status summary
runTests Run test cases linked to requirement set
updateImplementationStatusUpdate requirement set implementation status summary
updateVerificationStatusUpdate requirement set verification status summary

Topics