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
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. with requirements toolbox™ you can author requirements directly within simulink® or exchange requirements with third-party requirements tools. you can establish and analyze traceability between requirements, design, generated code, and test.
using simulink 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 with simulink design verifier™, which uses formal analysis techniques. with simulink 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 use simulink test to help manage this equivalence testing workflow.
examples and how to
see also: formal verification, requirements traceability, simulink design verifier, simulink coverage, requirements toolbox, simulink test