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
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.
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.
To exclude test code from the code coverage results and only include application code, add the ExcludeFromCodeCoverageAttribute attribute to your test class.
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.
Need to tick "Show Test Bundle"
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