Main Content

getTestCaseByName

Class: sltest.testmanager.TestFile
Package: sltest.testmanager

Get test case object by name

Description

example

tc = getTestCaseByName(tf,name) returns a test case object with the specified name.

Input Arguments

expand all

Test file containing the test cases to get, specified as an sltest.testmanager.TestFile object.

Name of the test case with the test file object, specified as a character vector. If the name does not match a test case, then the function returns an empty test case object.

Output Arguments

expand all

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

Examples

expand all

tf = sltest.testmanager.TestFile('My Test File');
tcArray = getTestCaseByName('testOne');
Introduced in R2020b