Failed to Error Domain=com.apple.dt.xctest.ui-testing.error Code=10001 "Application is not running"
All of the UI tests were working in Xcode 13 but once I updated to 14, they all failed. Also noted that all unit tests pass and the issue is only with UI tests. I've tried XCUIApplication launch but that didn't help.
I encountered the same error but only on a CI runner (Github Actions). What made it pass was adding
app.activate()beforeapp.launch()in the setUp func:Hope this helps!