主要内容

Create and Run Tests Using the New Simulink Test Manager (Tech Preview)

R2026b
Since R2026b

Note

The redesigned Simulink® Test Manager is a tech preview in R2026b. The primary purpose of the tech preview is to provide early access to the most common testing workflows. For more information about supported workflows, see Overview of the Redesigned Simulink Test Manager (Tech Preview).

To enable the feature, click the New Test Manager button in the existing Test Manager or use the sltest.stmv2.open function at the command line.

This tutorial shows how to use the redesigned Simulink Test Manager to create and run tests. You create a test file, organize tests around a component under test (CUT), define a test interface of parameters and signals, create a logical assessment that verifies whether a signal stays within specified bounds. Then, you run a back-to-back test that compares assessment simulation results across two different run settings. In this tutorial, you follow these steps:

  1. Create a Test File and Define the Test Interface (Tech Preview) — Open the model and redesigned Test Manager, create an SLTEST test file, define the component under test (CUT), and specify the parameters and signals that test cases can use.

  2. Add a Logical Assessment to a Test Case and Review Results (Tech Preview) — Configure the test interface for assessments, create a bounds-check logical assessment, run the test, and review the assessment results.

  3. Create and Run a Back-to-Back Test (Tech Preview) — Define run settings for normal and software-in-the-loop (SIL) simulation modes, configure a runlist with a comparison task, and run a back-to-back test to compare simulation results.

Examine the Model

This tutorial uses the sldemo_fuelsys_stm model, which is based on the sldemo_fuelsys air-fuel ratio control system model. The sldemo_fuelsys_stm model includes modifications for testing and compatibility with code generation. To open the model, enter:

openExample("simulinktest/TestManagerExample")

sldemo_fuelsys_stm model open in Simulink

See Also

Topics