Run tests with Test Manager


resultObj =
resultObj =,Value)


resultObj = runs all of the Simulink® Test™ test files in the Test Manager, returning a sltest.testmanager.ResultSet object resultObj.

resultObj =,Value) uses additional options specified by one or more Name, Value pair arguments.


collapse all

You can run tests at a test-file, test-suite, or test-case level if they are loaded in the test manager.

% Create the test file, test suite, and test case structure
tf = sltest.testmanager.TestFile('API Test File');
ts = createTestSuite(tf,'API Test Suite');
tc = createTestCase(ts,'simulation','Simulation Test Case');

% Assign the system under test to the test case

% Run the test case and return results data
ro = run(tc);

Input Arguments

collapse all

Name-Value Pair Arguments

Example: 'Parallel',true,'Tags',{'safety'}

collapse all

Specifies whether to run tests with Parallel Computing Toolbox™. Requires Parallel Computing Toolbox license.

Example: 'Parallel',true

Specifies test tags for execution. For more information, see Tags.

Example: 'Tags',{'safety'}

Example: 'Tags',{'safety','regression'}

Output Arguments

collapse all

Results set object to get results from, returned as a sltest.testmanager.ResultSet object.

Introduced in R2015a

Was this topic helpful?