sltest.testmanager.run

Run tests with Test Manager

Description

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

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

Examples

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
setProperty(tc,'Model','sldemo_autotrans');

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

Input Arguments

collapse all

Name-Value Pair 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