As titled, I literally create a new project with UI Tests and it just fails.
/.../Test2/Test2UITests/Test2UITests.swift:37: error: -[Test2UITests.Test2UITests testLaunchPerformance] : Failed to terminate com.darylteo.Test2.Test2:27031: Failed to terminate com.darylteo.Test2.Test2:0
t = 60.29s Tear Down
Test Case '-[Test2UITests.Test2UITests testLaunchPerformance]' failed (60.288 seconds).
Test Suite 'Test2UITests' failed at 2022-09-18 13:34:26.714.
Executed 2 tests, with 1 failure (0 unexpected) in 65.396 (65.400) seconds
The app just goes black in simulator, but simulator is still interactive and the app can be hard stopped. I can't run a single test suite without it failing in this way, and running a single test repeatedly suffers from the same issue (works 1 time, fails the next)
I'm guessing this may be some kind of issue with the debugging connection to the simulator, but this kind of flakiness just completely makes XCUITest useless.
M1 MacBook Pro 16" with Pro Max
Monterey 12.5.1 (21GB3)
XCode Version 14.0 (14A309)
Simulator:
- Version 14.0 (986.3)
- SimulatorKit 624
- CoreSimulator 857.7
Assistance appreciated
Other due diligence:
- similar issue, but its 4 years old, and the error message is slightly different, reference to old xcode bug. UITest Failed to terminate com.test.abc:3708 after 60.0s; state is still `Running Foreground
- similar issue, but only on Fastlane CI, not Simulator How to fix "Failed to terminate app" error in XCUItests?
- another really old post that just brute forces the test. Will possibly try this as a workaround. XCTests failing to launch app in simulator intermittently
- open Radar, 6 years old. No resolution http://www.openradar.appspot.com/25548393