With test sequences, you can author functional testing scenarios as a set of steps and transitions using MATLAB® as the action language. A test sequence can progress according to the model behavior, using sequential or switched step groups. Create test sequences in a Test Sequence block.
Functional testing requires assessing simulation behavior and comparing simulation
output to expected output. You can author test assessments in the Test Manager,
model, and test harness. Test assessments can include conditional statements,
baseline and equivalence data comparisons, scripted custom criteria, or blocks from
the Model Verification library.
verify statements authored in a
Test Assessment block return results to the Test Manager, and can
also be used in real-time tests. For an overview of the different verification
methods, see Assessment Basics.
|Add test sequence step|
|Add test sequence step after existing step|
|Add test sequence step before existing step|
|Add symbol to test sequence|
|Add new transition to test sequence step|
|Delete test sequence step|
|Delete test sequence block symbol|
|Delete test sequence transition|
|Edit test sequence step|
|Edit symbol in Test Sequence block|
|Edit test sequence step transition|
|Find Test Sequence blocks|
|Find test sequence steps|
|Find Test Sequence block symbols|
|Get Test Sequence block properties|
|Create Test Sequence block|
|Find Test Sequence blocks|
|Read Test Sequence block symbol properties|
|Read properties of test sequence transition|
|Set Test Sequence block properties|
Describes the basic structure of a test sequence and the Test Sequence block.
An overview of use cases and methods for authoring test assessments, including
signal comparison, custom criteria,
verify statements, and
run-time assessments in the model.
How to activate
verify statements, connect Test
Sequence and Test Assessment blocks, verify multiple
conditions in the same time step.
How to use test steps, transitions, data, and sequences in the Test
Sequence and Test Assessment blocks, including
When decomposition sequences.
Control animation, set breakpoints, track data values, and control stepping.
Reference for operators and expressions used in Test Sequence and Test Assessment blocks.
Assess model simulation or real-time tests with
statements. Stop simulation with
Transition between steps in a test sequence using conditional logic, temporal operators, and event operators.
Use functions to generate signal pattern inputs to the component under test, and call external functions from test steps.
This example shows how to create a test harness and test sequence using the programmatic interface.
Place test assessments in a library for use in multiple test harnesses.
Simulink® Test™ outputs graphical results of the Model Verification block library so you can use the Test Manager or Simulation Data Inspector to see when your test assessments pass and fail.
This example demonstrates how to test a transmission shift logic controller using test sequences and test assessments.
Test an autopilot subsystem against a requirement.