Reputation: 11
App is getting installed for every test method in Amazon device farm. But the same code works fine on real devices. Any capabilities to be added to get rid of this issue?
Upvotes: 0
Views: 422
Reputation: 98
AWS Device Farm does not install the app every time; however they do run each test individually rather than in bulk.
Upvotes: 0
Reputation: 976
There is solution for this problem. However, you need to install the app only once on the device before you start execution.
If you install the app (apk file) manually then you don't need to add the "app" desired capability. Instead you can just add two capabilities : "appActivity" and "appActivity"
capabilities.setCapability("appPackage", "com.your.app.package.name");
capabilities.setCapability("appActivity", ".ui.ActivityName");
If you use "app" capability in desired capabilities then appium tries to install the apk on the device every time when driver is initialized. Removing this capability and adding appPackage and appActivity is the best way to avoid re-installing the app every time.
Upvotes: 0