Appium Android 1.2.4.1 - tests now failing sporadically, tests run really slow and Appium keeps hanging

  • Platform: Android
  • Appium version: 1.2.4.1
  • Emulator/Simulator or Real Device: Emulator (Genymotion)
  • Client langauage (language binding): Java
  • OS: Windows

Was on Appium 1.2.1. All tests were running fine. Have upgraded to Appium 1.2.4.1. And also taken latest Java Client (2.0.0)

Have a number of issues now:

(1) Most of the tests are failing. This is sporadic. I run them again and they pass. The reason they are failing seems to be that it loses connection with the session. This is probably related to the next issue (2)
(2) Tests are now running even slower than before. I was hoping that this update would speed up the tests. It does not seem to matter whether I run with IgnoreUnimportantViews true or false (except if I run with true, some tests are failing as cannot locate elements with the current locators. However for ones where elements can all be located, tests still run slowly). It does not seem to be the location of elements that is making them run slowly. Often it finds the element ok - but then it takes FOREVER to do the action I want, e.g. click a button or type into an EditText. Can take over a minute sometimes. Then because it has taken over a minute Appium ends the session and the test fails. If I run the test again it may fail again or it may pass.
(3) Appium now seems to use a load more resources than it used to. It is killing my machine. Often if I go to the Appium UI window to stop appium - it becomes unresponsive and I have to wait minutes before it actually ends after I clicked the button.
(4) Another thing I noticed - has something changed with the way elements are located on a page. If I scroll through a listview - I notice that the object location is a bit sporadic. No longer seems relative to the visible screen. . get varying results for the location of an element after I have swiped (swipe(fromx,fromy,tox,toy,swipeTime)). I need to get the element location of an element near the top of the visible screen - after swiping. This element is roughly located at the top of the screen - after one swipe its y coord was 241 - after another swipe, the element, despite being slightly LOWER on the screen (so should have a large y coord) is 167. It would appear that the 241 coord it gave me is actually not correct.

Any advice you could give would be much appreciated. I am unable to proceed with this upgrade as the tests are now unusable. .

Many thanks,
Kirsty

Update on All of This:

So later on today I noticed that all my tests were running ok and all the issues above seemed to have gone away. This seemed rather odd. The only thing I could think of was that I had opened up Android Studio and the Device Manager to check some element ids.

On closing the device manager and Android Studio, all the issues return! On opening up Android Studio and the Device Manager - they go away again.

Is there some new thing where you need these to be running for your tests to work? THis never used to be the case??