Create the following handle class in your current
folder.
Create the following test class in your current folder.
Create the following test class in your current folder. This test class
subclasses MyClass
.
Create a test suite from all the files in your current folder. Depending
on what files are in your folder, your test suite might differ.
suite =
1×4 Test array with properties:
Name
ProcedureName
TestClass
BaseFolder
Parameterization
SharedTestFixtures
Tags
Tests Include:
0 Parameterizations, 0 Shared Test Fixture Classes, 0 Tags.
View the names of the test elements in the suite.
ans =
4×1 cell array
{'Feature1_Test/testA1'}
{'Feature1_Test/testB1'}
{'Feature2_Test/testA2'}
{'Feature2_Test/testB2'}
Create another test suite that contains only the suite elements that have MyClass
in the class hierarchy. View the test element names. Since the test class Feature2_Test
is the only test class to subclass MyClass
, only test elements from that class are included in the suite.
ans =
2×1 cell array
{'Feature2_Test/testA2'}
{'Feature2_Test/testB2'}
Alternatively, use the testsuite
function to create the filtered suite directly.