# How to use "enableCodeCoverage" flag For Xcode test step

**URL:** <https://discuss.bitrise.io/t/how-to-use-enablecodecoverage-flag-for-xcode-test-step/1386>\
**Category:** Question & Answer\
**Created:** [April 5, 2017, 2:47pm UTC](https://discuss.bitrise.io/t/how-to-use-enablecodecoverage-flag-for-xcode-test-step/1386 "2017-04-05T14:47:41Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [April 5, 2017, 4:14pm UTC](https://discuss.bitrise.io/t/how-to-use-enablecodecoverage-flag-for-xcode-test-step/1386/4 "2017-04-05T16:14:29Z")

</div>

If you use the `-enableCodeCoverage` option the generated profile should be at `$PROJECT_TEMP_ROOT/CodeCoverage/$PROJECT_NAME/Coverage.profdata` - source:

> <https://stackoverflow.com/questions/34283141/xcodebuild-did-not-generate-coverage-profdata-for-cocospods-project>

You can run the same command locally on your Mac to test it, or with our CLI ([How to debug your build locally / "It works on my Mac/PC but not on bitrise.io"](http://discuss.bitrise.io/t/how-to-debug-your-build-locally-it-works-on-my-mac-pc-but-not-on-bitrise-io/392))

---

_[View the full topic](https://discuss.bitrise.io/t/how-to-use-enablecodecoverage-flag-for-xcode-test-step/1386)._
