Tests cannot be run because the test plan “xxx” could not be read

220 Views Asked by At

In Xcode(14.3.1), I suddenly get this error when trying to run test today, and it is working fine yesterday. Check this file in Finder, it is exist. And also presented in Xcode.

Run in command line get the same error. Please advice, what could cause this problem.

xcodebuild: error: Failed to build project myproject-ios-test with scheme myproject-ios-test-scheme.: Tests cannot be run because the test plan “ProdSanity” could not be read

What changed, I moved ProdSanity.xctestplan and related test cases into a new folder but did perform a few test cases before committing the code.

enter image description here

1

There are 1 best solutions below

0
On

I understand a long time has passed and you probably already solved this. However, I found a solution that worked for me that may be useful if this happens in the future.

You can click on your Scheme> Edit Scheme > On the Test Tab click on the minus (-) sign to remove the current test plan > Try to add it again.