基于需求的测试
设置需求与测试工件之间的验证链接类型,例如:
Simulink® Test™ 中的测试文件、测试套件和测试用例
Simulink Design Verifier™ 验证模块
Simulink Model Verification 库中的模块
使用实现状态度量来检查需求是否已实现,并消除一致性方面的缺失。使用验证状态度量,通过运行与需求关联的测试来检查需求是否已经过验证。在需求编辑器中查看需求集的实现和验证状态。运行测试后,查看结果摘要并解决测试失败问题。创建申诉来从实现和验证状态度量计算中排除需求。
类
slreq.ReqSet | Work with requirement sets |
slreq.Justification | Requirement justifications |
slreq.verification.services.TAP | Work with external results sources (自 R2020a 起) |
slreq.verification.services.JUnit | Work with external results sources (自 R2020a 起) |
方法
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 |
主题
- Review Requirements Implementation Status
Use the requirements implementation status to check how extensively requirements are implemented in your model.
- Review Requirements Verification Status
Use the requirements verification status to check test and analysis results linked to your requirements.
- 将测试用例链接到需求
将 Simulink Test 测试用例与需求相关联。
- Verify Requirements with MATLAB Tests
Verify requirements by running linked MATLAB® tests.
- 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.