Xcode 7 UI Testing Failure: App accessibility isn't loaded
Asked Answered
M

4

21

While I'm running UITests on Simulator with Xcode 7, it's failed when invoking XCUIApplication().launch() with App accessibility isn't loaded

enter image description here

Megaton answered 6/9, 2015 at 8:58 Comment(3)
I am hitting this issue as well. When I run UI Tests from Xcode7 (command + U) then all UI tests succeed. When I run them using Xcode Bot, then some or all UI tests fail with this reason "App accessibility isn't loaded".Mopey
I'm getting this, and notice that the app will eventually load and test(s) proceed after waiting exactly 1 minute. Deleting the app off the device and it runs fine the first time. Then hangs 1 minute each time after. (xcode 7.0.1)Ronaldronalda
Were you able to solve this issue? I am facing the same issue in xcode 7.2Scrobiculate
E
2

this is a known bug in Xcode bot, usually happens on large server code bases. It's already been filed by Apple Developers (myself as well), and they're 'fixing' it.

Hope this helps.

Elison answered 21/1, 2016 at 19:28 Comment(3)
How do you know this? Is there is an openradar tracking number for this bug?Hanging
No but I've come across it before. I searched it up and a lot of developers on Apple forums had the same issue and was just settled as a bugElison
Any news about this?Accede
D
0

If you run tests inside CI system under your control, you could possibly reset simulators before running the UI tests. That way the bug is workarounded.

You could reset simulators from command line with following command:

xcrun simctl list | awk -F "[()]" '{ for (i=2; i<NF; i+=2) print $i }' | grep '^[-A-Z0-9]*$' | xargs -I uuid xcrun simctl erase uuid

As pointed in this SO thread you could also use(however I didn't try it):

xcrun simctl erase all

Devlen answered 15/4, 2016 at 12:53 Comment(1)
Resetting the simulators before running my UITests does not work for me.Crossley
N
0

Restarting the device got rid of this issue for me. (I was using a real device not a simulator)

Niello answered 16/3, 2021 at 15:54 Comment(0)
A
0

I got this error following a crash in the test app in CI. In my case, I successfully reproduced the issue locally, then it was easy to see that it crashes (a crash alert appears) and to investigate and fix the error. In my case the alert was also written to stderr, but on the CI it was not redirected to the logs. If I couldn't repro locally, my next step was to find a way to redirect stderr & stdout to logs.

Accede answered 19/3, 2022 at 20:44 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.