I know about new feature in Xcode 7 - Code Coverage. I know how to turn it on:
go to Edit scheme -> Test -> Info tab -> enable Gather coverage data.
I did it, run tests, and... Where is Test Report for my tests?
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.
To view the coverage reports: Select the Report Navigator in the navigator pane on the left (⌘8) Select the latest Test run in the navigator pane. Select the Coverage tab in the editor.
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.
So, go to the Product menu and choose Scheme > Edit Scheme. Next, choose the Test scheme and activate its Options tab. Finally, check the Code Coverage box, so that Xcode will gather code coverage data while your tests are running.
Since you turned it on in your scheme, and then build and test:
Go to your Report navigator
Then select your last test:
Finally choose Coverage tab:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With