Main Content

getTestSuiteByName

Class: sltest.testmanager.TestFile
Namespace: sltest.testmanager

Get test suite object by name

Syntax

ts = getTestSuiteByName(tf,name)

Description

ts = getTestSuiteByName(tf,name) returns a test suite with the specified name.

Input Arguments

expand all

Test file that contains the test suite, specified as a sltest.testmanager.TestFile object.

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

Example: 'Test Suite 5'

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 with default test suite
tf = sltest.testmanager.TestFile('My Test File');

% Get the test suite object by test suite name
ts = getTestSuiteByName(tf,'New Test Suite 1');

Version History

Introduced in R2015b