Clear app data - operation

Clear app data attempts to delete local data of the app during the test run so that application is reset to its initial state before the next test step executes.

To perform this operation in the Suitest Test editor use the Clear app data line:

Clear app data
Clear app data

To perform this operation in the Suitest JavaScript API use the clearAppData command:

await suitest.clearAppData();

Use cases

The application may store some data locally to remember a particular user preference or setting. Sometimes it is practical to empty the stores in order to test a particular piece of functionality.

For example if a user checks "Don't show this dialog again" on a certain popup the application may choose to store users choice in a local data store. Resetting the store will cause the popup to appear again.

What data is deleted

Platform Data deleted
Android Local storage
HbbTV / Freeview Play Cookies and local storage
HTML-based Cookies and local storage
Xbox One (Native) Application data (local, roaming and temporary data stores)
Xbox One (HTML) Application data (local, roaming and temporary data stores), cookies and local storage

Automatic local data clearing

Xbox One, LG webOS, Android TV: Local data is cleared every time when the app is reinstalled on the device.

HTML based platforms: If you use Suitestify in your app, the local data is cleared automatically every time the new Suitestify session is started. In automated mode this means on the start of every test. In interactive mode this means every time you connect to a device.