How to force install apk but not delete after test


#1

i want to install an apk regardless it is installed or not before, it must override the existing one. and i want to keep it on android phone after test.
How could i implement it with capabilities? i found if i set fullReset to true, it will force to install apk, but it also delete it after test, that is not what i want.

capabilities.setCapability(“noReset”, false);
capabilities.setCapability(“fullReset”, true);
capabilities.setCapability(MobileCapabilityType.APP, path)


#2

I am also stuck with this the same question. Any help is appreciated.

when upgraded from the appium version 1.7.2 to 1.10.0 , the already installed app is not getting deleted when provided with below app capability. It was working with 1.7.2.
appCapabilities.setCapability(“app”, apkFile);

With Appium 1.10.0 & Java client - 1.6.0 , getting error as It is impossible to create a new session because ‘createSession’ which takes HttpClient, InputStream and long was not found or it is not accessible.


#3

There is installApp API method, which might be helpful there


#4

Normally i do 1 test to install fresh app (unfortunatelyy it will uninstall app after). All further test i run with fullReset false.