Possible reasons why appium ios test is running slowly on some computers

496 views Asked by At

I am running appium tests on ios that are running very, very slowly on some machines, but much faster on another. Both machines have somewhat similar specs, but the performance differential is substantial. For instance, I have 4 text fields I am trying to send text to. On the faster machine, this is how fast it's running:

##### Starting get element with locator {:xpath=>"//XCUIElementTypeOther[@name='main'][1]/XCUIElementTypeOther[3]/XCUIElementTypeTextField"}
##### Time to get element: 0.6259970664978027 seconds
##### Time to send keys: 1.412217140197754 seconds
##### Starting get element with locator {:xpath=>"//XCUIElementTypeOther[@name='main'][1]/XCUIElementTypeOther[5]/XCUIElementTypeTextField"}
##### Time to get element: 0.8429489135742188 seconds
##### Time to send keys: 1.5375289916992188 seconds
##### Starting get element with locator {:xpath=>"//XCUIElementTypeOther[@name='main'][1]/XCUIElementTypeOther[7]/XCUIElementTypeTextField"}
##### Time to get element: 0.8602356910705566 seconds
##### Time to send keys: 2.2906301021575928 seconds
##### Starting get element with locator {:xpath=>"//XCUIElementTypeOther[@name='main'][1]/XCUIElementTypeOther[9]/XCUIElementTypeSecureTextField"}
##### Time to get element: 0.8182432651519775 seconds
##### Time to send keys: 1.605348825454712 seconds
^^^ Machine specs: 
Macbook Pro (15-inch 2017)
Processor : 2.9 Ghz Quad-Core I7
Memory: 16 GB
Graphics : Radeon Pro 560 4GB 
           Intel HD Graphics 630 1536 MB

And, on the slower machine, this is the result:

##### Starting get element with locator {:xpath=>"//XCUIElementTypeOther[@name='main'][1]/XCUIElementTypeOther[3]/XCUIElementTypeTextField"}
##### Time to get element: 3.373900890350342 seconds
##### Time to send keys: 5.192986011505127 seconds
##### Starting get element with locator {:xpath=>"//XCUIElementTypeOther[@name='main'][1]/XCUIElementTypeOther[5]/XCUIElementTypeTextField"}
##### Time to get element: 4.875856876373291 seconds
##### Time to send keys: 5.553454875946045 seconds
##### Starting get element with locator {:xpath=>"//XCUIElementTypeOther[@name='main'][1]/XCUIElementTypeOther[7]/XCUIElementTypeTextField"}
##### Time to get element: 4.758421897888184 seconds
##### Time to send keys: 5.982282876968384 seconds
##### Starting get element with locator {:xpath=>"//XCUIElementTypeOther[@name='main'][1]/XCUIElementTypeOther[9]/XCUIElementTypeSecureTextField"}
##### Time to get element: 4.933738946914673 seconds
##### Time to send keys: 5.845119953155518 seconds
^^^ Machine specs: 
Macbook Pro (15-inch 2016)
Processor : 2.7 Ghz Quad-Core I7
Memory: 16 GB
Graphics : Intel HD Graphics 530 1536 MB

I understand I'm using a long xpath locator, this is necessary for these elements. The issue I have is why is there a substantial performance difference between the two. Could the additional Radeon graphics card be the reason? Is there setting on the ios simulator in the slower machine I'm missing? I understand that this is an open ended question, but I've researched this issue for days with no results. Any help would be appreciated.

1

There are 1 answers

0
Yashwant Das On

Since you are using different computers, I have few questions in my mind...

  • Are you using the same Xcode & Simulators in both computers?
  • What about the Appium?

Ideally with almost identical computers, you shouldn't be seeing much of a difference. Could you please share the Xcode & Appium versions.