run

Class: sltest.testmanager.TestSuite
Package: sltest.testmanager

Run test cases in test suite

Syntax

resultObj = run(ts)

Description

resultObj = run(ts) runs the enabled test cases in the test suite and returns a results set object.

Input Arguments

expand all

Test suite with the test cases you want to run, specified as an sltest.testmanager.TestSuite object.

Output Arguments

expand all

Test results, returned as a sltest.testmanager.ResultSet results set object.

Examples

expand all

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

% Remove the default test suite
tsDel = getTestSuiteByName(tf,'New Test Suite 1');
remove(tsDel);

% Assign the system under test to the test case
setProperty(tc,'Model','sldemo_autotrans');

% Run the test suite and return an object with results data
ro = run(ts);

Introduced in R2015b