Main Content

Simulink Test Manager

Model and code testing in different execution environments, manage test suites, and analyze and report results


You can use the Simulink Test Manager to create test cases for Simulink® models and code in desktop, SIL, PIL, and HIL (for target computers running Simulink Real-Time™) execution environments. You can create or import test data, run tests, view results, and create reports. You can also import and test C and C++ code, and MATLAB® test scripts.

You can group test cases into test suites, which are saved in a test file. The types of test you can create are simulation tests, equivalence (back-to-back) tests to compare models or generated code, and baseline tests to compare model output to a known baseline. You can run tests directly on your model or use test harnesses, which keep the test environment separate from your model. See Test Harness and Model Relationship.

You can specify the model or component to test, as well as:

  • Test inputs

  • Test outputs, such as logged signals and states

  • Baseline criteria for baseline tests

  • Iterations to run different combinations of inputs, parameters, baseline criteria, etc.

  • Temporal and logical assessments of simulation behavior

  • Model parameter and configuration overrides

  • Callbacks to run before and after loading the model

  • Coverage settings to measure the extent to which model or code execution paths are exercised

  • Link requirements to the tests that verify them


If your model or test harness contains a To Workspace block, the block variable is not saved in the base workspace after the test finishes running. Upon test completion, the base workspace is restored to its original state.

Image of the Simulink Test Manager

Open the Simulink Test Manager

Use one of these options to open the Simulink Test Manager:

  • In the Simulink toolstrip

    1. Open the Apps tab.

    2. In the Model Verification, Validation, and Test section, click Simulink Test.

    3. On the Tests tab, click Simulink Test Manager on the Tests toolstrip.

  • At the MATLAB command prompt, enter sltest.testmanager.view.

In the Simulink Test Manager, the test sections in the Test Browser pane contain the options for the test. For descriptions of the options, see Specify Test Properties in the Test Manager.

By default, running a test in the Simulink Test Manager disables breakpoints for Simulink, Stateflow®, and Test Sequence blocks. Use Run with Stepper in the Simulink Test Manager to run a test that uses breakpoints in the simulation stepper. When using Run with Stepper:

  • Do not run the test in fast restart simulation mode.

  • Use signal logging, not root output logging.

  • In external Excel files used by the test, specify the full block path for the signals and parameters.

If you have a Simulink Check™ license, you can monitor the progress and quality of your model testing efforts in the Dashboard tab. For information, see View Model Testing Status in Simulink Test Manager (Simulink Check).

Version History

Introduced in R2015a