Xcode 8: LLVM Code Coverage doesn't include results from UI tests

Originator:acapulco1988
Number:rdar://28482015 Date Originated:9/26/16
Status:Duplicate of 29653052 Resolved:
Product:Xcode Product Version:8.0 (8A218a)
Classification: Reproducible:Always
 
Summary:
When "Gather coverage data" is checked, and unit tests and UI tests are attached to the target, running llvm-cov on the resulting Coverage.profdata does not include coverage from UI tests. The coverage is shown correctly in the Xcode UI.

Steps to Reproduce:
1. Create an iOS application target with unit tests & UI tests
2. Edit the target's scheme to "Gather coverage data"
3. Add a UI test
4. Run the following commands:

xcodebuild -scheme <scheme> -derivedDataPath ./out -destination 'platform=iOS Simulator,name=iPhone 6s' test
xcrun llvm-cov show -instr-profile ./out/Build/Intermediates/CodeCoverage/Coverage.profdata ./out/Build/Intermediates/CodeCoverage/Products/Debug-iphonesimulator/<Application>.app/<Application>

Expected Results:
Both unit tests and UI test coverage is reflected.

Actual Results:
Only unit test coverage is reflected.

Version:
Version 8.0 (8A218a) on macOS Sierra 10.12 (16A323)

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!