Test Creation

Create test inputs, acceptance criteria, and expected outputs.

Generally, a test case is defined by its inputs, expected outputs, acceptance criteria, and parameters. Use the Test Manager to author test cases for your specific application. Map inputs to your test case from external MAT or Excel® files, or use inputs generated from Simulink® Design Verifier™. Apply absolute or relative tolerances to your baseline data, or author custom criteria in the embedded MATLAB® editor. Create test iteraions that combine different inputs, parameter values, or Signal Builder groups.


sltest.testmanager.viewLaunch the Simulink Test Manager
sltest.testmanager.loadLoad a test file in the Simulink Test manager
sltest.testmanager.setprefSet Test Manager preferences
sltest.testmanager.getprefGet Test Manager preferences
sltest.testmanager.createTestsFromModelGenerate test cases from a model
sltest.testmanager.copyTestsCopy test cases or test suites to another location
sltest.testmanager.moveTestsMove test cases or test suites to a new location
sltest.testmanager.closeClose the Simulink Test Manager
sltest.testmanager.getTestFilesGet test files open in the Test Manager
sltest.harness.createCreate test harness
sltest.harness.deleteDelete test harness
sltest.harness.findFind test harnesses in model
sltest.import.sldvDataCreate test cases from Simulink Design Verifier results


sltest.testmanager.CustomCriteriaAdd or modify custom criteria
sltest.testmanager.TestFileCreate or modify test file
sltest.testmanager.TestSuiteCreate or modify test suite
sltest.testmanager.TestCaseCreate or modify test case
sltest.testmanager.TestIterationCreate or modify test iteration
sltest.testmanager.OptionsTest file options
sltest.testmanager.ParameterSetAdd or modify parameter set
sltest.testmanager.ParameterOverrideAdd or modify parameter override
sltest.testmanager.TestInputAdd or modify test input
sltest.testmanager.CoverageSettingsModify coverage settings
sltest.testmanager.BaselineCriteriaAdd or modify baseline criteria
sltest.testmanager.EquivalenceCriteriaAdd or modify equivalence criteria
sltest.testmanager.SignalCriteriaAdd or modify signal criteria


Introduction to the Test Manager

Structure model testing and organize large test sets.

Test Sections

Configure test cases.

Generate Test Cases from Model Components

Use the Test Manager to generate and synchronize test cases based on model components and test harnesses.

Test Models Using Inputs Generated by Simulink Design Verifier

Create test cases in Simulink Test™ using analysis results from Simulink Design Verifier.

Use External Inputs in Test Cases

Map external inputs from MAT-files and Excel.

Specify Microsoft Excel File Format for Signal Data

Specify signal types, data types, units, and interpolation for signal data and function-call execution times.

Run Combinations of Tests Using Iterations

Use iterations to test combinations of parameter sets, external inputs, configuration sets, Signal Builder groups, or baselines.

Test Models Using MATLAB Unit Test

Test integration with MATLAB test scripts and continuous integration systems.

Apply Custom Criteria to Test Cases

Post-process test results using scripts and the MATLAB Unit Test framework.

Create, Store, and Open MATLAB Figures

Generate figures with results and reports using MATLAB commands.

Apply Tolerances to Test Criteria

Specify tolerances for baseline or equivalence criteria.

Programmatically Create a Test Sequence

This example shows how to create a test sequence programmatically.

Manage Test File Dependencies

Track and manage dependencies for complex test files.

Test Manager Limitations

Understand Test Manager limitations for specific scenarios.

Was this topic helpful?