Is it possible to get code coverage of UI tests with XCode 7 beta 5?

In the release notes of XCode 7 beta 5I read that code coverage now works with UI tests ("Code coverage works with UI testing. (20966994)").


However, when I run a UI test and look at the results, although the coverage tab appears, it shows 0% code coverage on all files. I'm certain though that at least some of the code gets executed by the UI test.


Is there something that I'm missing?


Thanks,

Fabian

I have the same issue on Xcode 7.1 GM version.

Sample app is ok to generate beautiful coverage report after UI Testing was run.

However, it didn't work for my app. My app is more complicated with a lot of source files.

I too have the same issue on Xcode 7.1. I have both regular unit tests and ui tests running. I only get coverage on unit tests.

Please file a bug report with details about your application. We'd love to get to the bottom about why you're not getting coverage data.

Please file a bug report with details about your application. We'd love to get to the bottom about why you're not getting coverage data.

Mee too , I am stucked with the same problem. After running UI Tests for several times, I found that sometimes, i get coverage for UI tests and most of the times, i don't get any. I have no idea why?

I did provide a bug report and a sample project. Unfortunately, the failure to report coverage in my sample project only occurs when I run UI tests individually. When run with command-U my sample project does report code-coverage. I am unsure if running individual tests should or should not properly report coverage. It certainly would be nice if it did.


However, in the code base I am developing on, the UI testing does not not report coverage statistics regardless of how it was run (as a single test or as an aggregate). That code base is structured significantly differently than my sample project (I am building a private CocoaPod) which might have some impact on how coverage statistics are generated).

That's a good bit of additional information (not working when you run individual tests), that I hope you put in the bug report. It's supposed to work either way.

I did add that bit of information to the bug report, but I still can't quite reproduce the failure when running all tests in a simpler environment.

Is it possible to get code coverage of UI tests with XCode 7 beta 5?
 
 
Q