xcodebuild: error: Failed to build workspace iOS with scheme

I have a CI setup where one job builds xctestrun files for tests and another job that uses tem to actually run tests. The setup worked fine with XCode 14 on macOS 13. Now after switching to macOS 14 and XCode 15.0.1 xcodebuild doesn't want to run tests anymore:

xcodebuild -destination 'generic/platform=iOS' -derivedDataPath DerivedData_Temporary/ -resultBundlePath './fastlane/test_output/APPName-iOS.xcresult' -testPlan 'APPName-Unit-All' -xctestrun 'DerivedData_Temporary/Build/Products/APPName_APPName-Unit-All_iphonesimulator17.0-arm64-x86_64.xctestrun' test-without-building

throws an error

xcodebuild: error: Failed to build workspace iOS with scheme APPName-iOS.: Scheme “APPName-iOS” does not have an associated test plan named “APPName-iOS-Unit-All”

Almost the same command for macOS works perfectly fine.

What does this error even mean? And how to fix it?

Replies

According to this post on SO, there is a bug that will be fixed in future OS updates...

A fix for now, is not to use -testPlan 'APPName-Unit-All' when running test-without-building.

This has broken our entire CI workflow, and God knows how many others. Thanks DT!