The Test Framework Extensions toolbox provides a number of custom constraints, fixtures, and plugins to aid the testing of MATLAB code.
DatetimeTolerance- allow non-exact matching of datetimes and durations.HasStringLengthLessThan- check that string length is less than a set value.IsEqualVector- are two vectors equal irrespective of row or column orientation.IsEquivalentText- is text equal irrespective ofstring,char, orcellstrtype.IsSamePathAs- are paths equal irrespective of data type, file separator, and (Windows) capitalization.MatchesStatistically- are at least a certain percentage of elements equal within a tolerance.NotifiesEvent- check that a function or method call notifies an event.NotifiesPropertyEvent- check that a function or method call notifies a property event.PassesEventData- check that a function or method call notifies an event with custom event data.
FigureFixture- create a figure and close it on teardown.GridLayoutFixture- create a grid layout and delete it on teardown.PreferenceFixture- override a MATLAB preference and restore it on teardown.SimulinkModelFixture- load a Simulink model and close it on teardown.SuppressParpoolAutocreateFixture- suppress the automatic creation of parpools and restore the original setting in teardown.
FailOnSpecificWarningsPlugin- fail tests that issue selected warnings.
Testable- alias formatlab.uitest.TestCase
The documentation provides examples of how to use these constraints, fixtures, and plugins.
See also the database testing framework.
- Test Framework Extensions is provided as a MATLAB Toolbox. Download the toolbox file (
TestFrameworkExtensions.mltbx). - Double-click on the file
TestFrameworkExtensions.mltbxto install it. - Complete the installation process.
- Verify the toolbox installation by entering
>> ver testextat the MATLAB command line.
MathWorks Product Requirements
Test Framework Extensions is compatible with R2023b and later versions.
- MATLAB®
- The
SimulinkModelFixturerequires Simulink®. - Usually, you will use the
SuppressParpoolAutocreateFixturewith Parallel Computing Toolbox™.
The license is available in the LICENSE.txt file in this GitHub repository.
Copyright 2026 The MathWorks, Inc.