Tests running slow with real device (iOS 8 with Appium 1.3.1)

We have a test suite which was taking time of around 7 hours with iOS 7.1 (iPod Touch) and Appium 0.13 to finish.
After migrating the project to Appium 1.3.1 by updating desired capabilities and locators(Xpaths etc) we are running it with the same iPod Touch with iOS 8.1 and XCode 6.1 (Mac - Yosemite). Now it is taking more than 18 hours to run the complete suite. (Test Suite is divided into two parts as complete run at once freezes the test run half way)

Can anyone point out what is making the delay ?

Why it is taking more than double the time it was taking previously?

Is it an issue with iOS 8 instruments or Appium 1.3.1?

Yep i’m also facing similar issue on Appium 1.3.1 with iOS 8.1.

Need Help

i did a test with xCode 5.1.1 vs xCode 6.1
Appium: 1.3.1
Have run the same test case on different xCodes + iOS

xCode 6.1 - iOS 8.1
Time: 4 mins

xCode 6.1- iOS 7.1.1
Time: 2 min 4 sec

xCode 5.1.1 - iOS 7.1.1
Time: 1min 20 secs

Note: Some times it just Freezes in between the test as @Abhishek said.

I m also facing the issue or observed the difference compare to previous Appium 1.2.0 with Xcode 5.1.1 , Simulator performs the action very slowly .

I had similar issues after updates, here is how I improved the situation.

  1. Review all the xpath expressions , and try either replacing them with proper accessibility labels. if that is not possible then use the helper functions of Appium API like xpath_visible_contains , text, button etc. I have noticed that find_element is really slow for xpath expressions.
  2. For the freeze issue look for NSLog in your code and ensure that you are not logging large chunk of data there is a radar defect for this as it halts the simulator.
  3. I had to restructure my test cases to remove any un-necessary calls to find_element and any extra steps.

Hope this helps.

Hi All,

Somehow we are abled to overcome Appium server freezing issue (which also helps improving execution time to some extent).

Here is my blog on the same :

Hi We are already restarting Appium before every test inside a test suite still we see VERY slow with xpaths and Names. Any improvements you did recently to your efficiency???

XPaths are easily the slowest locator method. Predicates are super fast. Find by name should also be fast.

Thanks will try out Predicates , I have tried byName and it takes literally 7minutes , I have posted complete log in previous post.

On iOS, there’s also an internal by json strategy which I use in the Ruby client for performance. My guess is that predicates will be the fastest however it depends on the specific type of query. It’s easy to try a bunch of ways via the Ruby console and time them.

For those of you struggling with this issue, please report bugs on our github site. Repro steps are greatly appreciated.

Can u please tell me how to use Appium API Xpath_visible_contains ?