Enable Code Coverage Metrics

Code Coverage Setup in Xcode

Product menu (Option Key) select Test… then in Options tab check box for Gather coverage for “some targets” press the “+” to add a Target… select your Project’s target.


Xcode with not gather data for the test code. Just the main executable.

Enable Editor Visualization

Editor menu > enable Code Coverage


Shows strip down the right edge of the code - color coded to coverage. I guess the numbers indicate how many times the lines were executed.

But remember - this is NOT the same as TESTED.


Code coverage only really tells us what lines in the source did NOT get covered (run) during a test. Is says nothing about if the line of code was tested via an ASSERT!

Check the report frequently - add test to raise an area but don't chase 100%.