# Xcode 11 test Coverage report

**URL:** <https://discuss.bitrise.io/t/xcode-11-test-coverage-report/11455>\
**Category:** Question & Answer\
**Tags:** step, ios, testing, xcode\
**Created:** [December 30, 2019, 2:44pm UTC](https://discuss.bitrise.io/t/xcode-11-test-coverage-report/11455 "2019-12-30T14:44:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![DarioGasquez](https://avatars.discourse-cdn.com/v4/letter/d/ebca7d/32.png) [@DarioGasquez](https://discuss.bitrise.io/u/DarioGasquez)\
**Post date:** [December 30, 2019, 2:44pm UTC](https://discuss.bitrise.io/t/xcode-11-test-coverage-report/11455/1 "2019-12-30T14:44:41Z")

</div>

Hi,

I have successfully configured an Xcode 11 based project to build and generate a test report in Bitrise. I am able to access the test report from the build’s **App & Artifacts** tab as a `xcode-test-results-ProjectName.html` file. So far so good.

I am trying to include the Code Coverage as well, the project is configured to generate the Code Coverage report:  
Scheme test action -\> Options tab -\> checkbox ‘Code Coverage Gather coverage…’ checked

And the ‘Xcode test for iOS’ step in Bitrise is configured to generate the code coverage files, I see this in the log file:  
`$ set -o pipefail && env "NSUnbufferedIO=YES" xcodebuild "-project" "/Users/vagrant/git/ProjectName.xcodeproj" "-scheme" "ProjectName" "build" "COMPILER_INDEX_STORE_ENABLE=NO" "test" "-destination" "id=CB40CADF-1FE8-47B6-9C56-1B1D2EC2A1D9" "-resultBundlePath" "/var/folders/6q/wgy6jtp12w5gzgm9lzcglpqw0000gn/T/XCUITestOutput001844682/Test.xcresult" "GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES" "GCC_GENERATE_TEST_COVERAGE_FILES=YES" | xcpretty "--color" "--report" "html" "--output" "/Users/vagrant/deploy/xcode-test-results-ProjectName.html"`

But, the resulting HTML file only produces a tests report that does not include the Coverage information we see in Xcode.

I have searched and read some discussions on this matter, but they are a bit old (2017 or earlier) so I thought I’d ask what is the current state of the art before trying something mentioned in those posts.

Question:  
Is there a step or an updated article describing how to get this information in the **Apps & Artifacts** tab in a human readable (HTML for example) format?

Thanks!

–UPDATE–  
I managed to get a .zip file in the Artifacts tab, including an xcov coverage report, by adding a script step right after the **Xcode Test for iOS** step with the following script content:

```auto
#!/usr/bin/env bash
# debug log
set -x

gem install xcov
xcov -f $BITRISE_XCRESULT_PATH -o reports
zip -r $BITRISE_DEPLOY_DIR/xcov_report.zip reports/*

```

The question still applies, though.

---

<div class="post-metadata">

**Author:** ![ahvth-bitrise](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/ahvth-bitrise/32/2468_2.png) [@ahvth-bitrise](https://discuss.bitrise.io/u/ahvth-bitrise)\
**Post date:** [January 7, 2020, 10:09am UTC](https://discuss.bitrise.io/t/xcode-11-test-coverage-report/11455/2 "2020-01-07T10:09:05Z")

</div>

Hi @DarioGasquez! 👋 The test coverage reports are not one of the files that we automatically slate for deployment via the `Deploy to Bitrise.io` step, so the solution you’ve implemented here is a good approach.

---

<div class="post-metadata">

**Author:** ![DarioGasquez](https://avatars.discourse-cdn.com/v4/letter/d/ebca7d/32.png) [@DarioGasquez](https://discuss.bitrise.io/u/DarioGasquez)\
**Post date:** [January 7, 2020, 4:53pm UTC](https://discuss.bitrise.io/t/xcode-11-test-coverage-report/11455/3 "2020-01-07T16:53:25Z")

</div>

Thanks for the comment Andrew.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/bitrise/original/2X/d/d901cf2aad020f2dd11918afc89ec2089bb87b35.png) [@system](https://discuss.bitrise.io/u/system)\
**Post date:** [February 6, 2020, 4:53pm UTC](https://discuss.bitrise.io/t/xcode-11-test-coverage-report/11455/4 "2020-02-06T16:53:28Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
