Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 9.4 : Error generating code coverage

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?

like image 487
Jayprakash Dubey Avatar asked Jun 08 '18 13:06

Jayprakash Dubey


2 Answers

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).

like image 64
lemon lime pomelo Avatar answered Nov 17 '22 16:11

lemon lime pomelo


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.

like image 2
Angela Avatar answered Nov 17 '22 15:11

Angela