Documentation

sltest.testmanager.run

Run tests with Test Manager

Syntax

resultObj = sltest.testmanager.run
resultObj = sltest.testmanager.run(Name,Value)

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'}

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?