When I try to run unit tests in Xcode 14.3, it's often freezing up. Needs to be "Force Quit"ed.
This happens most often the first time I try to run a suite through the GUI. Running a single test sometimes freezes, but not always.
I can't pause the test execution, and when I try to exit Xcode it asks if I want to cancel the tests, but then it doesn't cancel them and I need to force quit at that point.
Is there any know issue with 14.3 that would cause this?
Our particular issue was related to having a Host Application for testing.
We wanted to run unit tests on a system where, for reasons I won't go into here, we wanted to not run the application itself. We run tests by using the App scheme, which has the test targets listed under the Test option in the scheme editor.
If we set Host Application to none, then Xcode will try to run the unit tests. It will build them, and it will look like it's starting them, but will lock up and require a Force Quit.
- The unit tests do run fine from the CLI in that case using xcodebuild.
- If we select the AppUnitTest scheme and run the unit tests then it works, but you can't debug them. Setting breakpoints in the tests doesn't work.
Definitely an Xcode bug--Xcode should never need a Force Quit. If it's a testing scenario it can't handle, it shouldn't run it.