9

I'm running all test cases of project (cmd + U) then all of sudden this error message pops-up with no reason. I'm using Xcode 9.4.

Screenshot 1

Any fix?

Jayprakash Dubey
  • 35,723
  • 18
  • 170
  • 177

3 Answers3

4

Is is possible you are running on device and it is locked?

The same thing just happened for me ("Error Generating Code Coverage" when trying to run all tests) and then I realized that Xcode was trying to build to my phone, which was locked. It ran ok on my phone after I unlocked it (and fine on the simulator as well).

lemon lime pomelo
  • 316
  • 1
  • 2
  • 14
  • Thanks for this. While the device I was trying to deploy to was definitely unlocked, I also had another iPhone plugged in that was. Disconnecting that iPhone made the error go away for me. – Albert Armea Aug 22 '18 at 20:55
2

I also had this problem and was able to solve it by running on a simulator rather than on my iPhone. If that doesn't work for you, look in the Report navigator (look for this button: report navigator toolbar button, looks like a speech bubble ) I had a failing Build Log in there with a message like this:

Test target MyAppTests encountered an error (Unable to connect to test manager on xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx If you believe this error represents a bug, please attach the log file at /var/folders/…filename.log)

If you have a message like that, take a look at the log file… it's what made me realise it was trying to connect to my iPhone.

Angela
  • 129
  • 1
  • 11
-2

Just restart your device. This simple way fix my problem.

yonlau
  • 113
  • 2
  • 8