xcode 14 freezes when running multiple tests in xctestplan

Hello everyone. There is really annoying regression in xcode 14 and 14.1 beta. We have a large modularized workspace. In workspace there is one ios app target that hosts xctestplan that contains over 50 unit test targets. When we try to run tests with cmd+u xcode immidately freezes and force quit is required. This was not an issue with xcode 13.

I tried to run tests via command line with xcodebuild. This time it stucks at prepare packages stage before building any target. After about 7-10 minutes it continues building targets. So I am guessing there is something wrong with resolving target dependencies in xcodebuild.

Anyway this is super frustrating for us and it holds us back to moving xcode 14. Is there other people experiencing the same issue with xcode 14? Did you find any workaround?

We're running into this as well, it's the main regression that's keeping us from updating. It takes about 10 minutes for xcodebuild for finish this step.

A spindump while this is beach balling is full of TargetDependencyResolver.discoverInfo(for:imposedParameters:)

FB11341701 - We've hit and identified this issue during some of the early beta phases. It's quite baffling that it wasn't prioritized as a required fix for the release itself as it's insanely obvious in scaled projects (not sure of the performance evaluations Apple runs internally when making core changes).

There's also some threads open on Twitter noting other's experiences here. I only hope some Apple engineers on the appropriate team pop their heads in as I haven't seen any mention of this issue on any known issue reports for Xcode updates/betas.

same problem :( I hope it will resolve

This seems only to happen when using test or build-for-testing, builds or archives seem to be able to scale even with hundreds and hundreds of targets. As soon as we have more than a dozen or so test schemes, this slows to a crawl for us.

Xcode 14.1 RC released and sadly the problem still exists :(

Still in RC2, haven't made any progress in determining what the root cause is

I'm having the same problem. Is this only with Intel computers?

Negative, this happens on M1s, Intels, pretty much of any RAM size too.

Same issue here. I really hope this will be fixed ASAP!

Same issue

Still present on Xcode 14.2. The Build Timeline shows this as "Preparing packages" because it doesn't actually seem to have a trace for the prebuild activities, there are no actual packages being prepared and the spindumps still show TargetResolver

Looks like Xcode 14.3 beta 1 resolves this issue.

This does not appear to be resolved in Xcode 14.3.

We still observe that issue with Xcode 15.

We run for actions in parallel: Building the app for macOS, building the app for iOS, running tests for macOS, running tests for iOS. Running tests for iOS alone takes longer than the entire rest together, despite the fact that we have 50 times more macOS than iOS tests.

xcode 14 freezes when running multiple tests in xctestplan
 
 
Q