3

I want to set Appium Flag --no-reset programmatically.


This Flag is used when we don't want to reset app state between sessions (IOS: don’t delete app plist files; Android: don’t uninstall app before new session). Its default Value is False, I want to make it true because I have written my Test scripts by making --no-reset=true on my local env..


Why I want to do this

I'm using AWS-Device Farm (which runs Test cases on multiple real devices using cloud service) to test my Android App and I don't have control over Appium server running on AWS, and by default its --no-reset flag is false ,Hence It resets my App during each run, Which results in Test Case Fail.


Logs from AWS-Device Farm

Starting testBBB
Pre-launching app
Starting android appium
Java version is: 1.7.0_75
Retrieving device
Found device 06db10920b305807
Device API level is: 21
App is already installed, resetting app
Starting App

Note:- I'm using Appium V1.4.6, Intellij Idea (Java), Junit Framework. Please Help And suggest some solution. Thanking You.

Community
  • 1
  • 1

2 Answers2

1

You can't use --no-reset with AWS Device Farm cloud. Actually all devices from aws clod are dynamically allocated and reset every thing (i.e. apps+ data + settings) on each test run, according the AWS devicefarm design.

So every time you get a device it is like a fresh new device with all default settings.

Vikas Thange
  • 230
  • 2
  • 13
0

You should be able to configure this functionality using the noReset desired capability when connecting to the Appium server.

Per the Appium documentation (found here):

noReset Don’t reset app state before this session. Default false true, false

ahawker
  • 3,306
  • 24
  • 23
  • I'v already tried that, but the thing is that AWS-Farm just ignores that Capability. I think that AWS Farm is in initial stage and there are many Flaws they might fix in next release. Thanks for your suggestion. – Darshan Ambhaikar Aug 28 '15 at 07:18