Code Coverage not reported with xcworkspace

When setting up GUI tests for Xcode 7 in a normal project and enabling code coverage everything works fine.


But if a project is part of a workspace the code coverage is not reported. What can i do?

Replies

That sounds weird, and is certainly not expected. Please file a bug report to let us investigate your issue.

Ok, i do.

Edit: not sure if the following has any effect. I'm still having this issue after a while of using Xcode. My temp fix is to quit xcode and the simulator. Also debugging UI tests on device is broken. Both of these are pretty annoying.


Make a scheme where "Container" is the workspace and not the project and run the test via that scheme. Both unit tests and UI tests code coverage will be included this way. Unit test code coverage works when you run via a scheme with "Container" as project, but UI tests do not. Looks like a UI testing bug. This sort of scenario is easy to duplicate by using Cocoapods, although I would not guess the bug is due to Cocoapods itself, but rather the workspace structure that results from using it.