Applicazioni di test
È possibile utilizzare il framework di test delle applicazioni di MATLAB® per testare le applicazioni di App Designer o le applicazioni compilate in modo programmatico utilizzando la funzione uifigure. Il framework di test delle applicazioni consente di scrivere una classe di test che esegue programmaticamente un gesto su un componente della UI, come la pressione di un pulsante o il trascinamento di un cursore, e verifica il comportamento dell'applicazione.
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 | Select option in frontmost dialog box in figure window (Da R2024b) |
dismissDialog | Dismiss frontmost dialog box in figure window (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.