Create and Run MATLAB Tests
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 Manager | Manage MATLAB tests and results for projects (Since R2023a) |
Classes
matlabtest.selectors.DependsOn | Select TestSuite array elements by source code
dependency (Since R2023a) |
Functions
matlab.unittest.TestSuite.fromRequirements | Create test suite from requirements (Since R2023a) |
Topics
- Create Tests for MATLAB Source Code
Generate a starter test class that contains code to exercise your script or function. Use the generated code as a starting point for adding more tests.
- Run MATLAB Tests
Run MATLAB tests programmatically or by using the MATLAB Editor, Test Browser, or MATLAB Test Manager.
- Manage Tests and Results by Using the MATLAB Test Manager
Manage tests and test results for projects by using the MATLAB Test Manager.