.
Done ExampleTest
Failure Summary:
Name Failed Incomplete Reason(s)
ExampleTest/testA X Filtered by assumption.
ExampleTest/testB X Filtered by assumption.
ExampleTest/testC X Filtered by assumption.
The Test methods did not change but all 3 are filtered due to an assumption failure in the
TestMethodSetup block. The testing framework executes methods in the
TestMethodSetup block without assumption failures, such as setupMethod2. As
expected, the testing framework executes setupMethod2 3 times, once before each
Test method.
Class Setup and Teardown Code
If an assumption failure is encountered inside of a TestCase method with the
TestClassSetup or TestClassTeardown attribute, MATLAB filters the entire
TestCase class.
The methods in the following TestClassSetup block within ExampleTest.m contains
an assumption failure.
methods(TestClassSetup)
function setupClass(testCase)
testCase.assumeEqual(1,0)
% remaining test code is not exercised
end
end
Updated ExampleTest Class Definition
classdef ExampleTest < matlab.unittest.TestCase
methods(TestClassSetup)
function setupClass(testCase)
testCase.assumeEqual(1,0)
% remaining test code is not exercised
Dynamically Filtered Tests