Inputs
You can develop test scenarios by mapping external data to your test cases, authoring input data, or automatically generating inputs using Simulink® Design Verifier™:
Create a template MAT-file or Excel® file from your model and add values.
Create a test directly from data contained in Excel files. For more information, see Use External File Data in Test Cases.
Map MAT- or Excel files to the system under test.
Generate test inputs in Simulink Design Verifier to extend coverage or replicate design error conditions. Add the generated tests to your test file.
Place a Signal Editor block in the system under test and author inputs graphically.
You can also author test inputs that react to simulation behavior by using a Test Sequence block. Use a Test Sequence block to define sets of steps and transitions by using MATLAB® as the action language. You can also use sequential or switched step groups in a hierarchy and create test sequences in a Test Sequence block.
Blocks
Test Sequence | Create simulation testing scenarios, function calls, and assessments |
Tools
Simulink Test Manager | Model and code testing in different execution environments, manage test suites, and analyze and report results |
Topics
Use External Data
- Create External Data Files to Use in Test Cases
Create Excel, MAT, and MATLAB script (.m
) files for test data input. - Use External File Data in Test Cases
Add test data from Excel files, MAT-files, and MATLAB script (.m
files) to test cases.
Generate Test Inputs
- Increase Coverage by Generating Test Inputs
Use Simulink Design Verifier to generate tests that extend coverage and recreate design errors, and add generated tests to your test file. - Generate Test Signals
Generate signal inputs to the component under test.
Use a Sequence of Test Steps
- Test Sequence Basics
Overview of test sequence actions, transitions, and hierarchy. - Test Sequence Editor
How to use test steps, transitions, data, andWhen
decomposition sequences in Test Sequence and Test Assessment blocks. - Test Sequence and Assessment Syntax
Operators and expressions used in Test Sequence and Test Assessment blocks and Stateflow® charts. - Transitions, Temporal Operators, and Messages in Test Sequence Blocks
Transition between test sequence steps using conditional logic, temporal operators, and messages. - Using an External Function in a Test Sequence Block
Call externally-defined function from Test Sequence block.