Main Content

Create and Run MATLAB Tests

Create and run tests and test suites interactively and programmatically

MATLAB® Test™ extends the capabilities of the MATLAB unit testing framework. For example, you can:

  • Automatically create test classes to exercise MATLAB source code.

  • Run test suites based on file dependencies and requirement links.

  • Run tests in projects by using the MATLAB Test Manager app.

For more information on how MATLAB Test extends the functionality provided by MATLAB apps, classes, and functions, see Extend MATLAB Unit Testing Framework with MATLAB Test.

Apps

MATLAB Test ManagerManage MATLAB tests and results for projects (Since R2023a)

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)
matlabtest.selectors.HasBaselineSelect TestSuite array elements by baseline-specific parameterization (Since R2024b)
matlabtest.selectors.DependsOnSelect TestSuite array elements by source code dependency (Since R2023a)

Functions

matlabtest.parameters.matfileBaselineDefine data in MAT file as baseline data (Since R2024b)
verifyEqualsBaselineVerify value is equal to baseline data (Since R2024b)
matlab.unittest.TestSuite.fromRequirementsCreate test suite from requirements (Since R2023a)

Topics