Xcuitest script execution time issues

Environment:
OS X El Capitan
Appium 1.6.3
Robot Framework 3.0.1
Robot Framework AppiumLibrary 1.4.2
iPhone 6 iOS 10.0.2

Desired capabilities:
… platformName
… platformVersiond
… deviceName
… app
… udid
… automationName
… xcodeConfigFile
… realDeviceLogger

Hi all,

finally i managed to get xcuitest working. I created a really simple script that basically just
logins in our native iOS app. I noticed that each time i run the same script, it takes a bit longer to execute it.

iOS 10.0.2 + appium 1.6.3

Login 1: 22,8s
Login 2: 25s
Login 3: 25,7s
Login 4: 27,5s
Login 5: 28,5s
Login 6: 30,1s
Login 7: 31,2s
Login 8: 31,7s

I tested similar script in android device:

Login 1: 26,3s
Login 2: 26,7s
Login 3: 26,8s
Login 4: 26,5s

Sometimes it took like over a minute to execute login script. Any idea why xcuitest behaves this way? I’ve not yet tried UI elements that are a lot more complex than really simple login.

I’m a bit concerned about to continuous increase in execution time. I’m really wondering can we proceed with our automation efforts in iOS automation or just let it be.

Any help is highly appreciated.

Br

Tommi

Which takes too long, start script execution or elements location?

On Appium 1.6, XCUITest, iOS10 the WebDriverAgent takes a lot of time to start executing script.
Even sometimes WDA gets stuck in a black screen, maybe updating WDA solves it.

In the other hand the elements location strategy is important in XCUITest. I’m not really sure but I think xpath location is slow on XCUITest, while find by name or similar is pretty quickly. If you are using xpath may you need improve your queries for speed gain.

Other fact I’ve realized that taking screenshots may take a lot of time too. There are some devices that takes about 5~10 seconds to take a screenshot.

Hope it helps.

hi, @hamena

it seems that locating elements, waiting elements etc. sometimes takes a lot more time
than some other run. All my testing was done in local environment, running same script on same physical iPhone 6. Also i did not use any xpaths. All locators used accessibility id’s.

I wouldn’t be so concerned if execution times where somewhat similar but they are quite far from that.