matlab.unittest.TestCase
- : TestCase ¶
Base class for MATLAB unit tests.
This class provides the foundation for writing unit tests compatible with MATLAB’s unit testing framework. Test classes should inherit from
matlab.unittest.TestCase.classdef MyTest < matlab.unittest.TestCase methods (Test) function testSomething (testCase) testCase.verifyEqual (1 + 1, 2); end end endWall-clock limit (nexus#1917 / nw ti2-004): a test class may declare an ordinary instance property
TestTimeout(seconds). The Nexusruntestsrunner fails the test when measured Duration exceeds that value. Omit the property (or set a non-finite value) for no limit.MATLAB R2026a decision: there is no
TestTimeoutattribute (Illegal attribute 'TestTimeout'), and MATLAB does not enforce a plain property of that name. Nexus keeps the MATLAB-legal property surface (opt-in on the subclass, not on this base class) and adds post-run enforcement for the backlog wall-time behaviour.