This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Test Sequences and Assessments

Step-based test sequences, temporal logic, model assessments

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.


Test SequenceCreate simulation testing scenarios, function calls, and assessments
Test AssessmentAssess simulation testing scenarios, function calls, and assessments
Sequence ViewerDisplay messages, events, states, transitions, and functions between blocks during simulation


expand all

sltest.testsequence.addStepAdd test sequence step
sltest.testsequence.addStepAfterAdd test sequence step after existing step
sltest.testsequence.addStepBeforeAdd test sequence step before existing step
sltest.testsequence.addSymbolAdd symbol to test sequence
sltest.testsequence.addTransitionAdd new transition to test sequence step
sltest.testsequence.deleteStepDelete test sequence step
sltest.testsequence.deleteSymbolDelete test sequence block symbol
sltest.testsequence.deleteTransitionDelete test sequence transition
sltest.testsequence.editStepEdit test sequence step
sltest.testsequence.editSymbolEdit symbol in Test Sequence block
sltest.testsequence.editTransitionEdit test sequence step transition
sltest.testsequence.findFind Test Sequence blocks
sltest.testsequence.findStepFind test sequence steps
sltest.testsequence.findSymbolFind Test Sequence block symbols
sltest.testsequence.getPropertyGet Test Sequence block properties
sltest.testsequence.newBlockCreate Test Sequence block
sltest.testsequence.readStepFind Test Sequence blocks
sltest.testsequence.readSymbolRead Test Sequence block symbol properties
sltest.testsequence.readTransitionRead properties of test sequence transition
sltest.testsequence.setPropertySet Test Sequence block properties
sltest.getAssessmentsReturns test assessment set object
sltest.AssessmentAccess assessment from set
sltest.AssessmentSetAccess a set of assessments from a simulation



Test Sequence Basics

Describes the basic structure of a test sequence and the Test Sequence block.

Assessment Basics

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.

Activate verify Statements

How to activate verify statements, connect Test Sequence and Test Assessment blocks, verify multiple conditions in the same time step.

Test Sequence Editor

How to use test steps, transitions, data, and sequences in the Test Sequence and Test Assessment blocks, including When decomposition sequences.

Debug a Test Sequence

Control animation, set breakpoints, track data values, and control stepping.


Syntax for Test Sequences and Assessments

Reference for operators and expressions used in Test Sequence and Test Assessment blocks.

Run-Time Assessments

Assess model simulation or real-time tests with verify statements. Stop simulation with assert statements.

Test Step Actions and Transitions

Transition between steps in a test sequence using conditional logic, temporal operators, and event operators.

Signal Generation Functions

Use functions to generate signal pattern inputs to the component under test, and call external functions from test steps.

Programmatically Create a Test Sequence

This example shows how to create a test harness and test sequence using the programmatic interface.

Test Assessment Reuse

Place test assessments in a library for use in multiple test harnesses.


View Graphical Results From Model Verification Library

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.

Test Downshift Points of a Transmission Controller

This example demonstrates how to test a transmission shift logic controller using test sequences and test assessments.

Requirements-Based Testing for Model Development

Test an autopilot subsystem against a requirement.