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.

getTestSuiteByName

Class: sltest.testmanager.TestFile
Package: 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');

Introduced in R2015b