Main Content

Create MATLAB Tests

Create tests for MATLAB® source code
Since R2023a

Use MATLAB Test™ to automatically create tests for source code from a file or from the history of code execution in the MATLAB Command Window. Create baseline tests to validate your MATLAB code against previously inspected data.

MATLAB Test extends the test authoring capabilities of the MATLAB unit testing framework. For more information on how MATLAB Test enhances the functionality provided by MATLAB apps, classes, and functions, see Extend MATLAB Unit Testing Framework with MATLAB Test.

Classes

matlabtest.parameters.BaselineParameterBaseline parameter (Since R2024b)
matlabtest.baselines.MATFileBaselineRepresentation of baseline data stored in MAT file (Since R2024b)
matlabtest.constraints.EqualsBaselineTest if value is equal to baseline data (Since R2024b)

Functions

matlabtest.parameters.matfileBaselineDefine data in MAT file as baseline data (Since R2024b)
verifyEqualsBaselineVerify value is equal to baseline data (Since R2024b)

Topics

Featured Examples