UI Tests on Xcode Cloud fail due to Simulator randomly showing Apple logo

Hello everyone!

When I run UI Tests on Xcode Cloud, I often encounter unexpected failures. Checking the screen recording, I found that the iOS Simulator could go into a black screen with a white Apple logo and a progress bar for a period after the test starts. This behavior of the Simulator causes my app's UI Tests to fail randomly, which greatly affects the practical use of UI Tests.

I suspect this phenomenon is unrelated to my app and test cases, so I'm asking if anyone else has encountered a similar issue. 🤔

Yes, this quite annoying & quite often. And for resolving, it leaves me no way but enabling multiple retry at testplan

It's not related to Xcode Cloud. In my case it can be observed locally or on bitrise. Xcode 16.2 iOS 18.2

It's not related to tests itself. It's a specific simulator behaviour. It can be reproduced locally if you reset simulator xcrun simctl erase all and then run it. After booting it and waiting doing nothing in my case approximately 1 minute you can observe black screen with a white Apple logo and a progress bar. My suggestion is to boot simulator before tests and give it some time to be ready for testing. Ex.

xcrun simctl boot <YOU TEST DEVICE>
sleep(30)

Forgot to mention - Xcode 16.2 iOS 18.2

To be sure that simulator has been booted properly use xcrun simctl bootstatus <YOU TEST DEVICE> -b

UI Tests on Xcode Cloud fail due to Simulator randomly showing Apple logo
 
 
Q