Main Content

Run tests with Test Manager


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.

% Open the model for this example

% 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 Arguments

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

Specifies whether to run tests with Parallel Computing Toolbox™ or MATLAB® Parallel Server™. Requires Parallel Computing Toolbox or MATLAB Parallel Server license, respectively.

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.

Extended Capabilities

Introduced in R2015a