matlab.unittest.TestSuite.fromName
Class: matlab.unittest.TestSuite
Package: matlab.unittest
Create Test
object from single test name
Syntax
Description
suite = matlab.unittest.TestSuite.fromName(
creates a test suite with additional options specified by one or more name-value
arguments.testName
,Name,Value
)
Input Arguments
|
Name of the test, specified as a string scalar or character vector. For a
given test file, the name of a test uniquely identifies the smallest
runnable portion of the test content. The test name includes the package
name, filename (excluding the extension), procedure name, and information
about parameterization. The |
Name-Value Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN
, where Name
is
the argument name and Value
is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Before R2021a, use commas to separate each name and value, and enclose
Name
in quotes.
|
External parameters, specified as an array of |
|
Names of the source files and folders required by the test, specified as a string vector, character vector, or cell vector of character vectors. When you use this argument, the file defining the test must depend on the specified source code. Otherwise, the method returns an empty test suite. The specified source code must represent at least one existing file
with a You must have MATLAB®
Test™ installed to use Example: Example: |
Examples
Tips
The test class, function or script described by
testName
must be on the MATLAB path when you are creating and running theTestSuite
.