appiumvisual-studio-app-centervisual-studio-app-center-test

How to wipe data between tests on App Center (iOS with Appium)


I'm writing UITests with Appium and Java. Running them locally works fine. In AppCenter however, only the first test runs ok. The cause is that my tests need a clean install.

When running the tests on Android (within AppCenter) the the data seems to be wiped between tests.

On iOS (within AppCenter) the data seems to be retained between tests methods. The app is not re-installed between the test methods. I tried calling driver.resetApp between tests, but that doesn't seem to work either. My test suite is based on this example.

Question: How to get my data wiped between tests?


Solution

  • You can use fullReset=true capabilities ..

    cap.setCapability(MobileCapabilityType.FULL_RESET,"True");