To start, what is noReset in terms of Appium?
noReset is used to set the state of the app. It is defined as true or false boolean value:
If you are running automated tests using Real Devices on Sauce Labs, you might notice that when you try to set noReset to any boolean value (true/false) on iOS it will always be true, despite the documentation which says that noReset is always set to false on Sauce Labs.
Note: noReset has to be used in conjunction with cacheId in order to work.
For more on cacheId check this wiki.
For iOS tests on Real Devices, customers will always see noReset set to true. This means DO NOT reinstall the app. A double negative naming convention might cause a lot of confusion.
During a test, if a customer provides a capability noReset:false, the app will be uninstalled and re-installed again between the sessions. However, in the logs, it will always be set to true.
In short, on Sauce, it will always be set to false, regardless of if the customer tries to pass in a capability and set it to false and regardless of what the logs show. It is false by default.
As mentioned above, to change the value of noReset, it has to be used along with cacheId to work.
false (or not set): the app under test gets re-installed between cached sessions
true: the app stays on the device between cached sessions
When using cacheId and noReset, what it means is “Your app under test and its data will remain as-is on the device. We are not making any changes.”
The app under test will only stay on the device if noReset is true otherwise we still uninstall/re-install the app under test between sessions.
If you would like to confirm that the device was indeed reused, you can look for usedCachedDevice:true capability in your Appium logs.
It would look similar to this: