After converting our tests in one of our schemes "Scheme" to test plans using the "Convert to use Test Plans" function in Xcode 13.4. We cannot run the tests using xcodebuild due to the following error:
xcodebuild: error: Failed to build project Scheme with scheme Scheme.
Reason: Tests cannot be run because the test plan “Scheme” could not be read.
Recovery suggestion: Confirm that the file exists and is valid and try again.
Setting the test plan name explicilty using the -testPlan
parameter results in the same error message.
The scheme configuration exists in the configured location and can be displayed by Xcode.
build-for-testing
for a project withtest-plan
yields multiple.xctestrun
files in the build directory with the format.<Scheme>_<TestPlan>_iphonesimulator<Version>-<Architecture>.xctestplan
– Alver