Run Appium test methods without reinstalling the app with every method


I am testing an Android application at work and we use Appium to do so. Our tests are written in such a way that the @BeforeMethod setUp() method is run every time before each test method. We separate them in classes, so that each class usually has 3-4 methods inside. The setUp() method then reinstalls the app on the device every single test through the caps.setCapability(), which in turn takes a lot of time.

My question is simple, is there a way to run a setUp() method only once before each test run, so that it would’t have to reinstall the app every single time? Or is it a core Appium requirement to do so? If so, can we make a feature request to change that somehow?

1 Like

Set capabilities fullReset to false and noReset to true. This way app will be restarted.


Brilliant! That actually solves a couple of my problems! Thanks Kirill!

I am glad that worked for you :smile:
If you will decide to reset app at some point here are the steps:

  1. uninstall app using adb/ideviceinstaller
  2. initiate new driver with the same capabilities

P.S. On Android you can reset app by clearing app data using adb command: adb -u UDID shell pm clear PACKAGE. That’s much faster than uninstalling and installing app.

please help…

I have been struggling with this problem for a long time. When I navigate to a web page and click on a web element then no errors occur, it looks like it was successful but on physical Android mobile