Our iOS tests have suddenly become noticeably slower. I’m not sure on the exact date it happened but I noticed during a run i did on November 5th. The last time I can confirm it working normally was from a run on September 24th.
For reference, we have a booking flow in our app which consists of (for a new user):
- Select who the booking is for (User/Child)
- Select with/without insurance
- Select location
- Select appointment
- Enter first/last name
- Enter DoB
- Select Gender
- Enter reason for visit
- Enter Email Address
- Enter Phone Number
- Enter Password
- Review Booking & Book
Between completing step 4 and arriving at step 12 we used to average around 1 to 1.5 minutes, now it’s taking up to 4 minutes to do the same steps. I haven’t been able to see any code changes in our framework that would cause this.
While trying to identify the cause of this I have tried the following:
- Appium server versions 1.22.0, 1.20.2 and 1.19.1
- appium-xcuitest-driver 3.53.1 and 3.56.3
- Appium-python-client 2.0.0.rc6, 2.0.0a0, 1.3.0 and 1.1.0
- Selenium 4.0.0.a7, 4.0.0 and 3.141.0
- iOS 15.1 and 14.7.1
- Xcode 13 and 13.1
- Use a version of our framework from 2 months ago
- Use an older version of our app from 2 months ago
So far nothing has made any difference.
From looking at the logs I can see that the slowness is occurring when appium is trying interact with an element. Here is a log from the execution of a single test case, but all tests appear to be impacted - https://gist.github.com/ctimpany/5d1d67dc78390c51e4472eced68640fc.
If you look at lines 1703 to 1737 you can see that it finds the element with accessibility id booking.last_name
very quickly, but when it tries to interact with it there is a long delay.
On line 1728 you can see it send a .setValue()
request for the element, but on line 1733 you see it doesn’t receive a response until ~20 seconds later.
This slowness doesn’t seem to exist throughout the entire test though, it only appears to start after a specific point.
If you look between lines 1129 and 1162 you can see that it finds and clicks the button identified by {"using":"xpath","value":"//XCUIElementTypeStaticText[@name='Me']"}
in under 2 seconds.
If you then look between lines 1187 and 1223, you can see that from 1187 and 1215 it takes under 2 seconds to find and trigger the click action for the booking.continu_without_insurance_button
. On line 1216 you can see a message stating that the connection has been closed, this is where the slowness begins. Between triggering the click action and trying to find the next element there is a gap of ~20 seconds.
I’m assuming it’s an apple issue but I’m hoping someone has had a similar issue or might have an idea of what’s causing this. It’s currently having a large impact on our tests and i’m not sure what to try next since i’ve been unable to do anything that makes a difference. Any help is greatly appreciated.