# Code coverage not visible in SonarQube UI

**URL:** <https://community.sonarsource.com/t/code-coverage-not-visible-in-sonarqube-ui/123794>\
**Category:** SonarQube Server / Community Build\
**Tags:** sonarqube, coverage\
**Created:** [August 27, 2024, 10:23am UTC](https://community.sonarsource.com/t/code-coverage-not-visible-in-sonarqube-ui/123794 "2024-08-27T10:23:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AndyHollings](https://avatars.discourse-cdn.com/v4/letter/a/da6949/32.png) [@AndyHollings](https://community.sonarsource.com/u/AndyHollings)\
**Post date:** [August 27, 2024, 10:23am UTC](https://community.sonarsource.com/t/code-coverage-not-visible-in-sonarqube-ui/123794/1 "2024-08-27T10:23:09Z")

</div>

Must-share information (formatted with [Markdown](https://commonmark.org/help/)):

- Using SonarQube ADO Plugin
- I am Trying to enable C# Code Coverage Reports

I have configured SonarCloudPrepare@2 with :

```auto
          sonar.cs.cobertura.reportsPaths=$(Build.SourcesDirectory)/**/coverage.cobertura.xml
          sonar.cs.vstest.reportsPaths=$(Build.SourcesDirectory)/**/*.trx
          sonar.sourceEncoding=UTF-8
          sonar.typescript.tsconfigPaths=**/tsconfig.json
          sonar.scm.provider=git
          sonar.exclusions=\
            **/bin/** ,\
            **/obj/** ,\
            **/node_modules/**

```

I build with:

```auto
dotnet test ${{test.projects}} --logger "trx;LogFileName=$projectDir.trx" --collect:"XPlat Code Coverage" --filter "$(targetTestsFilter)" ${{test.args}}

```

I SonarCloudAnalyze@2 and SonarCloudPublish with :

```auto
    - task: SonarCloudAnalyze@2
      displayName: 'Run SonarCloud analysis'
      inputs:
        organization: 'xxxxxx'
        projectKey: 'www.xxx.yyy.zzzzzzzz'
        projectName: 'FooBar'

```

I can see in the logs the code coverage reports not erroring ( there were errors initially as the content type was wrong)

In the UI I see my pull request but no coverage reports.

If I load the third party tool “dotnet tool install -g dotnet-reportgenerator-globaltool” I get

 ![coverage](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/3X/2/0/202e806377c0f3c409717b8504c762c4d82a4f30.jpeg)

So the Build Options must be right.

Any help appreciated.

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [August 28, 2024, 12:43pm UTC](https://community.sonarsource.com/t/code-coverage-not-visible-in-sonarqube-ui/123794/2 "2024-08-28T12:43:21Z")

</div>

Hi,

It’s not clear to me where you got these parameters

> [@AndyHollings](#):
>
> ```auto
> sonar.cs.cobertura.reportsPaths=$(Build.SourcesDirectory)/**/coverage.cobertura.xml
> sonar.cs.vstest.reportsPaths=$(Build.SourcesDirectory)/**/*.trx
> 
> ```

[The docs](https://docs.sonarsource.com/sonarqube/latest/analyzing-source-code/test-coverage/dotnet-test-coverage/) should help.

As a side note, there’s no need to provide

> [@AndyHollings](#):
>
> `sonar.scm.provider=git`

It’ll be picked up automatically from the environment.

&nbsp;  
HTH,  
Ann
