matlab.unittest.selectors.HasSuperclass Class
Namespace: matlab.unittest.selectors
Superclasses: matlab.unittest.selectors.Selector
Select TestSuite array elements by test superclass
Description
The matlab.unittest.selectors.HasSuperclass class provides a selector for
filtering a test suite based on test superclasses.
For a class-based test, test superclasses are all the superclasses of the class that defines the test. For more information about class hierarchies, see Hierarchies of Classes — Concepts.
Creation
Description
Input Arguments
Examples
Alternative Functionality
In addition to the HasSuperclass class, you can use the
Superclass name-value argument to create a filtered test suite based on
test superclasses. For example:
filteredSuite = matlab.unittest.TestSuite.fromFolder(pwd, ... "Superclass","MyClass");
You can also select and run tests using the Superclass name-value
argument of the runtests or runperf function. For example:
results = runtests(pwd,"Superclass","MyClass");
Version History
Introduced in R2018a