Model-Based Testing

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

Model-based testing is a systematic method to generate test cases from models of system requirements. It allows you to evaluate requirements independent of algorithm design and development.

Model-based testing involves:

  • Creating a model of system requirements for testing
  • Generating test data from this requirements-model representation
  • Verifying your design algorithm with generated test cases
Generate tests from requirements using model-based testing.

Ensuring Test Efficiency and Quality

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.

To increase the quality of generated test cases beyond traditional stochastic and heuristic methods, you can generate tests with Simulink Design Verifier™, which uses formal analysis techniques.

In addition, you can simulate test cases with Simulink Verification and Validation™ to:

  • Assess the completeness of your model-based testing cases
  • Identify missing requirements
  • Discover unintended functionality

Using SIL and HIL in Model-Based Testing

To incorporate hardware and production code into model-based testing, you can compare dynamic outputs of models with data collected through software-in-the-loop and processor-in-the-loop test, or with data measured in the test lab, using the Simulink Data Inspector in Simulink.

See also: MATLAB, Simulink Design Verifier, Simulink, formal verification, requirements traceability, Simulink Design Verifier, Simulink Verification and Validation