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?
I had similar issues after updates, here is how I improved the situation.
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.
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.
I had to restructure my test cases to remove any un-necessary calls to find_element and any extra steps.
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???
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.