This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

run

Class: sltest.testmanager.TestCase
Package: sltest.testmanager

Run test case

Syntax

resultObj = run(tc)

Description

resultObj = run(tc) runs the test case and returns a results set object.

Input Arguments

expand all

Test case you want to run, specified as an sltest.testmanager.TestCase object.

Output Arguments

expand all

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

Examples

expand all

% 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','Coverage 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 case and return an object with results data
ro = run(tc);

Introduced in R2015b