App Testing Framework
You can use the MATLAB® app testing framework to test App Designer apps, or apps built
programmatically using the uifigure
function. The app
testing framework lets you author a test class that programmatically performs a
gesture on a UI component, such as pressing a button or dragging a slider, and
verifies the behavior of the app.
To get started, see Overview of App Testing Framework.
Functions
press | Perform press gesture on UI component |
choose | Perform choose gesture on UI component |
drag | Perform drag gesture on UI component |
type | Type in UI component |
hover | Perform hover gesture on UI component (Since R2019a) |
chooseContextMenu | Perform choose gesture on context menu item (Since R2020b) |
dismissAlertDialog | Close frontmost alert dialog box in figure window (Since R2021a) |
matlab.uitest.unlock | Unlock figure locked by app testing framework |
matlab.uitest.TestCase.forInteractiveUse | Create test case for interactive use |
Classes
matlab.uitest.TestCase | Class for writing tests with app testing framework |
Topics
- Overview of App Testing Framework
Use the app testing framework to write tests for App Designer apps or apps built programmatically using the
uifigure
function. - Write Tests for an App
Test an app programmatically by using the app testing framework and the unit testing framework.
- Write Tests That Use App Testing and Mocking Frameworks
Create fully automated tests for an app by using the app testing framework and the mocking framework.