Main Content

getTestSuiteByName

Class: sltest.testmanager.TestSuite
Namespace: sltest.testmanager

Get test suite object by name

Syntax

tsOut = getTestSuiteByName(tsIn,name)

Description

tsOut = getTestSuiteByName(tsIn,name) returns a test suite with the specified name.

Input Arguments

expand all

Test suite, specified as an sltest.testmanager.TestSuite object.

The name of the test suite within a test suite object, specified as a character vector. If the name does not match a test suite, then the function returns an empty test suite object.

Output Arguments

expand all

Test suite, returned as an sltest.testmanager.TestSuite object. If the name does not match a test suite, then the function returns an empty test suite object.

Examples

expand all

% Create a test file and new test suite
tf = sltest.testmanager.TestFile('API Test File');
ts = getTestSuiteByName(tf,'New Test Suite 1');

% Create new test suite
createTestSuite(ts,'API Test Suite');

% Get test suite by name
ts2 = getTestSuiteByName(ts,'API Test Suite');

Version History

Introduced in R2015b