While I'm running UITests on Simulator with Xcode 7, it's failed when invoking XCUIApplication().launch()
with App accessibility isn't loaded
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.
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
Restarting the device got rid of this issue for me. (I was using a real device not a simulator)
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.
© 2022 - 2024 — McMap. All rights reserved.