Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 7 code coverage - No Coverage Data

I have ticked "Gather coverage data" and run the unit test, however Xcode shows "No Coverage Dat".

All Unit test are passed. Xcode 7 is used

enter image description here

enter image description here

like image 430
TS.xy Avatar asked Oct 21 '15 22:10

TS.xy


People also ask

How do I show code coverage in Xcode?

Running Tests and Coverage Locally in Xcode To enable code coverage, click the scheme editor in the toolbar. Select the CodecovDemo scheme and choose Edit Scheme. Select the Test action on the left. Check the Code Coverage box to gather coverage data.

How do I enable code coverage?

Go to Edit > Preferences > General and check Enable Code Coverage. This will enable access to the interface for the code coverage data that Mono exposes.

How do you exclude code from coverage?

To exclude test code from the code coverage results and only include application code, add the ExcludeFromCodeCoverageAttribute attribute to your test class.

How do I check my code coverage?

To calculate the code coverage percentage, simply use the following formula: Code Coverage Percentage = (Number of lines of code executed by a testing algorithm/Total number of lines of code in a system component) * 100.


1 Answers

Need to tick "Show Test Bundle"

like image 189
TS.xy Avatar answered Oct 04 '22 00:10

TS.xy