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.
press | Perform press gesture on UI component |
choose | Perform choose gesture on UI component |
chooseContextMenu | Perform choose gesture on context menu item |
drag | Perform drag gesture on UI component |
type | Type in UI component |
hover | Perform hover gesture on UI component |
matlab.uitest.unlock | Unlock figure locked by app testing framework |
matlab.uitest.TestCase.forInteractiveUse | Create a TestCase object for interactive use |
matlab.uitest.TestCase |
TestCase to write tests with app testing framework |
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.
This example shows how to test an app programmatically and qualify the results.
Write Test That Uses App Testing and Mocking Frameworks
This example shows how to write a test that uses the app testing framework and the mocking framework.