验证、确认和测试
使用基于模型的设计验证和确认嵌入式系统
系统化验证让您更有信心,确保设计准确地实现您的需求,并且测试可充分地执行那些需求。在开发的早期阶段,您可以创建一个高级系统模型并链接到系统要求。系统模型可以作为更详细模型的可执行规范和基础。
通过使用这些 MathWorks® 产品来补充基于模型的设计,您可以:
从需求追溯到架构、设计、测试和代码。
确认您的设计符合需求且不存在严重的运行时错误。
检查合规性并测量模型和代码的质量。
识别死逻辑并生成测试用例来解决缺失覆盖率。
生成报告和工件,并验证您的设计是否满足合规性标准。
您还可以通过以下方式指导 MATLAB® 软件开发:
编写需求并将需求与测试和代码关联。
运行动态测试来监控代码功能中的回归。
使用行业标准代码覆盖率度量来标识未测试的代码路径。
适用产品:验证、确认和测试
主题
定义需求
- Author Requirements in MATLAB or Simulink (Requirements Toolbox)
Create requirements and define the requirement hierarchy with MATLAB or Simulink®. - Import Requirements from Third-Party Applications (Requirements Toolbox)
Import requirements from external documents and requirements management tools.
将需求与设计相关联
- Test Model Against Requirements and Report Results (Requirements Toolbox)
Associate your model with detailed requirements, demonstrate traceability, test against requirements. - Link Test Cases to Requirements (Requirements Toolbox)
Associate test cases with requirements. - Track Requirement Links with a Traceability Matrix (Requirements Toolbox)
Track and manage links and change issues with the Traceability Matrix. - Validate Requirements by Analyzing Model Properties (Requirements Toolbox)
Validate requirements that are modeled as properties for a control system.
识别并消除设计缺陷
- Analyze Models for Design Errors (Simulink Design Verifier)
Run a Design Error Detection Analysis and interpret the results. - Analyze Models for Standards Compliance and Design Errors (Simulink Check)
Detect and resolve design errors, check against standards, analyze functional dependencies, and prove properties.
执行基于需求的测试
- Requirements-Based Testing for Model Development (Simulink Test)
Test an autopilot system against requirements. - Use Specification Models for Requirements-Based Testing (Simulink Design Verifier)
Follow a systematic approach to verify your design model against requirements. - Perform Functional Testing and Analyze Test Coverage (Simulink Coverage)
Analyze functional dependencies, test model components in isolation, create suites of test cases, test models, and code to achieve coverage. - Fix Requirements-Based Testing Issues (Simulink Check)
Fix model testing quality issues by using the Model Testing Dashboard. - Assess Requirements-Based Testing for ISO 26262 (Simulink Check)
Use the Model Testing Dashboard to analyze the completeness and quality of requirements-based testing activities in accordance with the ISO 26262 standard.
执行基于代码的模型测试和验证
- Analyze Code and Test Software-in-the-Loop (Simulink Check)
Detect code errors, generate code metrics, test code and model equivalence, test code against requirements. - 将 Polyspace 与 MATLAB 和 Simulink 集成 (Polyspace Bug Finder)
将 Polyspace® 与 MATLAB 和 Simulink 集成,以标识模型和代码中潜在的 Bug、运行时错误以及编码标准违规。 - 对通过 Embedded Coder 生成的代码运行 Polyspace 分析 (Polyspace Bug Finder)
检查通过 Embedded Coder® 生成的代码是否存在 Bug、运行时错误或编码违规情况。