question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Appium 1.8+ is brutally slow using Geb and Spock framework on iOS because AppiumDriver.getSession() became slow

See original GitHub issue

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."
    }

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:32 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
jacattaucommented, Jun 20, 2018

Tried 6.0.0 and iOS is much, much faster!

1reaction
mykola-mokhnachcommented, Jun 20, 2018

I’ll take care about memoizing the result of wda/screen call

Read more comments on GitHub >

github_iconTop Results From Across the Web

iOS tests suddenly became noticeably slower - Appium Discuss
Our iOS tests have suddenly become noticeably slower. ... haven't been able to see any code changes in our framework that would cause...
Read more >
Appium ios application automation execution is very slow for ...
While executing automation test cases written in java for iOS application it's execution takes long time for execution.
Read more >
iPhone safari takes more time to execute the same script than ...
I am using Page Object model Framework using Java + Appium. ... iOS became very slow after upgrading to Appium 1.8 but then...
Read more >
Really slow performance on Android - Appium Discuss
I test the same application on Android and iOS and the same test case run on iOS takes 1:30min but on Andorid almost...
Read more >
Appium is responding very very slow while launching the url
Appium is responding very slow while launching the url. It takes a very long time to launch the url in the chrome browser....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found