matlab.unittest.selectors.HasProcedureName Class
Namespace: matlab.unittest.selectors
Select TestSuite
array elements by procedure name
Description
The matlab.unittest.selectors.HasProcedureName
class provides a selector
for filtering a test suite based on test procedure names.
In a class-based test, the name of a test procedure is the name of a
Test
method that contains the test. In a function-based test, it is the
name of a local function that contains the test. In a script-based test, it is a name
generated from the test section title. Unlike the name of a test suite element, the name of a
test procedure does not include any namespace name, filename, or information about
parameterization.
Creation
Description
Input Arguments
Properties
Examples
Alternative Functionality
Use the HasProcedureName
class for maximum flexibility when filtering a
test suite based on test procedure names. Alternatively, you can create a filtered test suite
using the ProcedureName
name-value argument. For example:
filteredSuite = matlab.unittest.TestSuite.fromClass(?ZerosTest, ... "ProcedureName","testClass");
You can also select and run tests using the ProcedureName
name-value
argument of the runtests
or runperf
function. For example:
results = runtests("ZerosTest.m","ProcedureName","testClass");
Version History
Introduced in R2017a