Main Content

Test Apps

Use the app testing framework to write automated tests for App Designer apps

You can use the MATLAB® app testing framework to test App Designer apps or apps built programmatically using the uifigure function. With the app testing framework, you can create tests that programmatically perform gestures on UI components, such as pressing buttons or dragging sliders, and verify the resulting app behavior. To write tests for your app, create a test class by subclassing the matlab.uitest.TestCase class.

To get started, see Overview of App Testing Framework.

Functions

pressPerform press gesture on UI component
choosePerform choose gesture on UI component
dragPerform drag gesture on UI component
scrollPerform scroll gesture on UI component (Since R2024a)
typeType in UI component
hoverPerform hover gesture on UI component
chooseContextMenu Perform choose gesture on context menu item
chooseDialogMake a selection in dialog box (Since R2024b)
dismissDialogDismiss dialog box (Since R2024b)
matlab.uitest.unlockUnlock figure locked by app testing framework
matlab.uitest.TestCase.forInteractiveUseCreate test case for interactive use

Classes

matlab.uitest.TestCaseClass for writing tests with app testing framework

Topics

Related Information