Applicazioni di test
È possibile utilizzare il framework di test delle applicazioni di MATLAB® per testare le app sviluppate con App Designer o le app create in modo programmatico utilizzando la funzione uifigure. Con il framework di test delle applicazioni, è possibile creare test che eseguono in modo programmatico gesti sui componenti dell'interfaccia utente, quali premere pulsanti o trascinare cursori e verificare il comportamento risultante dell'applicazione. Per scrivere test per l'app, creare una classe di test derivando una sottoclasse dalla classe matlab.uitest.TestCase.
Per iniziare, vedere Overview of App Testing Framework.
Funzioni
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 (Da 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 (Da R2024b) |
dismissDialog | Dismiss dialog box (Da R2024b) |
matlab.uitest.unlock | Unlock figure locked by app testing framework |
matlab.uitest.TestCase.forInteractiveUse | Create test case for interactive use |
Classi
matlab.uitest.TestCase | Class for writing tests with app testing framework |
Argomenti
- 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.