appium: Appium 1.8+ is brutally slow using Geb and Spock framework on iOS because AppiumDriver.getSession() became slow
The problem
It appears something changed between Appium 1.7.2 and 1.8.0 in how Appium interacts with Geb/Spock framework. On Appium 1.6.5 and 1.7.2 I had no issues automating a hybrid app on iOS and the speed was pretty stellar. However, after updating to 1.8.0, 1.8.1, and 1.8.2-beta, the performance has absolutely tanked. The same tests on 1.6.5 and 1.7.2 that took 5 seconds now takes upwards of a minute since 1.8.0. Android is unaffected, the speed with Geb/Spock is still great. This is only affecting iOS and the mobile safari browser.
NOTE: Selenium performance is normal.
Environment
- Appium version (or git revision) that exhibits the issue: 1.8.0 and above. I did not test beta versions between 1.7.2 and 1.8.0
- Last Appium version that did not exhibit the issue (if applicable): 1.6.5, 1.7.2
- Desktop OS/version used to run Appium: MacOS High Sierra
- Node.js version (unless using Appium.app|exe): 9.6.1
- Mobile platform/version under test: iOS 11.3.1
- Real device or emulator/simulator: Real Device
- Appium CLI or Appium.app|exe: CLI
Details
I have an example test written with Geb/Spock:
def "should go to Individual button"(){
given:
page = waitFor { at HomePage }
when:
$(id: "cwl").click()
waitFor { $(id: "state") }
enterInput($(id: "age"),"18")
then:
waitFor { $(id: "ageError").displayed }
$(id: "ageError").text() == "Please enter an age between 0 and 17."
}
This test takes about 3 seconds on a desktop browser and about 5 seconds on a mobile device using Appium 1.6.5 and Appium 1.7.2. This very same test on Appium 1.8+ on iOS takes about 1 minute. Android is still 5 seconds.
Link to Appium logs
Log using Appium 1.7.2 working as expected Log using Appium 1.8.2-beta, very slow
Code To Reproduce Issue [ Good To Have ]
This is internal to our company app so not sure how much help this is but:
def "should go to Individual button"(){
given:
page = waitFor { at HomePage }
when:
$(id: "cwl").click()
waitFor { $(id: "state") }
enterInput($(id: "age"),"18")
then:
waitFor { $(id: "ageError").displayed }
$(id: "ageError").text() == "Please enter an age between 0 and 17."
}
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 32 (13 by maintainers)
Tried 6.0.0 and iOS is much, much faster!
I’ll take care about memoizing the result of
wda/screen
call