No test coverage in Xcode for XPC service

Originator:developer.computers
Number:rdar://FB9184995 Date Originated:2021-06-16
Status:Open Resolved:
Product:Xcode Product Version:12.5
Classification:Incorrect/Unexpected Behavior Reproducible:Yes
 
We have a couple separate targets in Xcode for our XPC services that we want to gather code coverage for. In the attached screenshot `gather-coverage-for-XPC.png` you can see that we have told Xcode to gather the code coverage for both XPC targets. When we run our tests, we see coverage for the other targets but do not see any coverage in XPC targets.
Please list the steps you took to reproduce the issue:
1. Create a project with XPC and enable test coverage
2. Run test that calls XPC and you can even set a breakpoint
3. See regular classes are covered but classes that are in XPC target shown no coverage

What did you expect to happen?
Xcode shows coverage for code in XPC target 

What actually happened?
XPC target shows no coverage for code

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!