Model requirements, generate test cases, compare code, and model outputs

基于模型的测试是一种系统方法,可以从系统要求模型生成测试用例。它允许您评估独立于算法设计和开发的要求。

Model-based testing involves:

  • Creating a model of system requirements for testing
  • 从此要求生成测试数据 - 模型表示
  • Verifying your design algorithm with generated test cases
Generate tests from requirements using model-based testing.

In model-based testing, you use requirement models to generate test cases to verify your design. This process also helps automate other verification tasks and streamlines the review process by linking test cases and verification objectives to high-level test requirements. WithSimulink Requirementsyou can author requirements directly within金宝app®or exchange requirements with third-party requirements tools. You can establish and analyze traceability between requirements, design, generated code, and test.

UsingSimulink Test™you manage the test cases and systematically execute them to confirm that your design meets requirements. To increase the quality of generated test cases beyond traditional stochastic and heuristic methods, you can generate tests withSimulink Design Verifier™, which uses formal analysis techniques. WithSimulink Coverage™you can use model and code coverage metrics to assess the completeness of your model-based testing efforts. These metrics can identify missing requirements and unintended functionality.

To incorporate hardware and production code into model-based testing, you can compare dynamic outputs of simulation results with data collected through testing in software-in-the-loop (SIL), processor-in-the-loop (PIL), or in real-time with hardware-in-the-loop (HIL). You can useSimulink Testto help manage this equivalence testing workflow.

See also:formal verification,requirements traceability,Simulink Design Verifier,Simulink Coverage,Simulink Requirements,Simulink Test