Tester des applications
Vous pouvez utiliser l’App Testing Framework de MATLAB® pour tester des applications App Designer ou des applications créées de manière programmatique avec la fonction uifigure. L’App Testing Framework vous permet de créer des tests qui appliquent de manière programmatique des gestes aux composants UI, par exemple appuyer sur des boutons ou faire glisser des curseurs, et de vérifier comment l’application réagit. Pour écrire des tests pour votre application, créez une classe de test en créant une sous-classe de la classe matlab.uitest.TestCase.
Pour en savoir plus, consultez Overview of App Testing Framework.
Fonctions
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 (depuis 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 (depuis R2024b) |
dismissDialog | Dismiss dialog box (depuis R2024b) |
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 |
Rubriques
- 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.