Probar apps
Puede usar el marco de pruebas para apps de MATLAB® a fin de probar apps de App Designer o apps creadas de forma programática usando la función uifigure. Con el marco de pruebas para apps, puede crear pruebas que realicen gestos de forma programática en componentes de la IU, como pulsar botones o arrastrar controles deslizantes, y verificar el comportamiento resultante de la app. Para escribir pruebas para la app, cree una clase de prueba clasificando en subclases la clase matlab.uitest.TestCase.
Para comenzar, consulte Overview of App Testing Framework.
Funciones
press | Perform press gesture on UI component |
choose | Perform choose gesture on UI component |
drag | Perform drag gesture on UI component |
scroll | Perform scroll gesture on UI component (Desde R2024a) |
type | Type in UI component |
hover | Perform hover gesture on UI component |
chooseContextMenu | Perform choose gesture on context menu item |
chooseDialog | Make a selection in dialog box (Desde R2024b) |
dismissDialog | Dismiss dialog box (Desde R2024b) |
matlab.uitest.unlock | Unlock figure locked by app testing framework |
matlab.uitest.TestCase.forInteractiveUse | Create test case for interactive use |
Clases
matlab.uitest.TestCase | Class for writing tests with app testing framework |
Temas
- Overview of App Testing Framework
Use the app testing framework to write tests for App Designer apps or apps built programmatically using the
uifigurefunction. - 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.