Requirements-Based Testing
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.Justification | Requirement 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 |
updateImplementationStatus | Update requirement set implementation status summary |
updateVerificationStatus | Update requirement set verification status summary |
Topics
- Verify and Validate a Model and Code
Use Verification, Validation, and Test products to define requirements, test models and code, check for design errors and standards compliance, and measure test coverage.
- Review Requirements Verification Status
Use the requirements verification status to check test and analysis results linked to your requirements.
- Review Requirements Implementation Status
Use the requirements implementation status to check how extensively requirements are implemented in your model.
- Link Test Cases to Requirements
Associate Simulink Test test cases with requirements.
- Verify Requirements with MATLAB Tests
Verify requirements by running linked MATLAB® tests.
- View Unified Verification Results in Metrics Dashboard and in Requirements Editor
Use the requirements verification status to visualize the results linked to your requirements which are used in Projects.
- Track Changes to Test Cases in Requirements Editor
Track changes to test cases linked with the requirements in the Requirements Editor.
- Justify Requirements
Provide justifications for your requirements.
- Include Results from External Sources in Verification Status
Link and reflect the results from external sources in Requirements verification status.
- Linking to a Test Script
Link a requirement to a MATLAB script.
- Linking to a Result File
Link a requirement to a test result file.