Test Sequences and Assessments

Step-based test sequences, temporal logic, model assessments

You can use the Test Sequence block to create test scenarios that respond to simulation. Generate test inputs using signal functions, and change test steps based on inputs from the model, using sequential or switched groups. Assess model behavior using temporal, conditional, and assessment operators. You can create, read, edit, and delete test sequence steps, transitions, and data symbols using the test sequence API. For an introductory test sequence example, see Introduction to Test Sequences.


Test SequenceCreate simulation testing scenarios, function calls, and assessments
Test AssessmentAssess simulation testing scenarios, function calls, and assessments
Message ViewerDisplay message or events between blocks during simulation


sltest.getAssessmentsReturns test assessment set object
sltest.AssessmentAccess assessment from set
sltest.AssessmentSetAccess a set of assessments from a simulation
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

Test Sequence Syntax and Operators


Working with Test Sequence and Test Assessment Blocks

Introduction to Test Sequences

Get started using test sequences and the Test Sequence block.

Test Sequence Editor

Work with test steps, transitions, data, and sequence types in the Test Sequence and Test Assessment blocks. Details on transition types including When decomposition.

Organize Test Sequences

Organize test sequences by considering test scenarios and requirements.

Debug a Test Sequence

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

Reuse Test Assessments

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

Test Sequence Action and Transition Operations

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

Generate Function-Based Test Signals

Use functions to generate signal outputs to the component under test.

Assess Simulation Using Logical Statements

Use verify and assert statements with logical connectives and relational operators in test sequences and assessments.

Programmatically Create a Test Sequence

This example shows how to create a test sequence programmatically.

Logic-Based Testing Applications

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 a Model Component Using Signal Functions

Build and simulate a test sequence using ramp and square wave signals.

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.

Parametric Sweep for a Simscape Thermal Model

Test and optimize a physical system using a test sequence, test harness, and the test manager.

Was this topic helpful?