# \#code-coverage

**URL:** https://community.sonarsource.com/tag/code-coverage/419.md

[Latest](https://community.sonarsource.com/latest.md) · [Categories](https://community.sonarsource.com/categories.md) · [Tags](https://community.sonarsource.com/tags.md)

---

## [Distinguish unit vs integration coverage in quality gate metrics and per line view](https://community.sonarsource.com/t/distinguish-unit-vs-integration-coverage-in-quality-gate-metrics-and-per-line-view/188071)

<div class="topic-metadata">

**Author:** [@Eman\_Harri](https://community.sonarsource.com/u/Eman_Harri)\
**Replies:** 3\
**Last updated:** [September 22, 2026, 2:53am UTC](https://community.sonarsource.com/t/distinguish-unit-vs-integration-coverage-in-quality-gate-metrics-and-per-line-view/188071 "2026-09-22T02:53:04Z")

</div>

Hello, We send two coverage reports to SonarQube in one analysis, one from our unit tests and one from our integration tests, and SonarQube merges them into a single Coverage number. We would like to know whether SonarQ…

---

## [Show me the PR files that failed code coverage. Don't make me navigate from project root](https://community.sonarsource.com/t/show-me-the-pr-files-that-failed-code-coverage-dont-make-me-navigate-from-project-root/177661)

<div class="topic-metadata">

**Author:** [@evan-templeton](https://community.sonarsource.com/u/evan-templeton)\
**Replies:** 4\
**Last updated:** [March 17, 2026, 12:45pm UTC](https://community.sonarsource.com/t/show-me-the-pr-files-that-failed-code-coverage-dont-make-me-navigate-from-project-root/177661 "2026-03-17T12:45:16Z")

</div>

which versions are you using SonarQube Server I think? It’s sonarqube.mycompany-is.com : Enterprise Edition v2025.4.1 (111832) ACTIVE Standard Experience how is SonarQube deployed Github Actions docker://sonarsource…

---

## [Code Coverage not visible in SonarQube for Mule REST SDK Connector (Mule 4 + JaCoCo)](https://community.sonarsource.com/t/code-coverage-not-visible-in-sonarqube-for-mule-rest-sdk-connector-mule-4-jacoco/151234)

<div class="topic-metadata">

**Author:** [@Thulasi](https://community.sonarsource.com/u/Thulasi)\
**Replies:** 3\
**Last updated:** [October 24, 2025, 1:54pm UTC](https://community.sonarsource.com/t/code-coverage-not-visible-in-sonarqube-for-mule-rest-sdk-connector-mule-4-jacoco/151234 "2025-10-24T13:54:56Z")

</div>

Hello SonarSource Team, I’m currently working on a MuleSoft REST SDK Connector project (Mule 4) and have successfully integrated SonarQube Community Edition for code quality checks. The analysis works fine, but code co…

---

## [Code-coverage not publishing on Sonar cloud dashboard](https://community.sonarsource.com/t/code-coverage-not-publishing-on-sonar-cloud-dashboard/149799)

<div class="topic-metadata">

**Author:** [@himanshu.teotia](https://community.sonarsource.com/u/himanshu.teotia)\
**Replies:** 1\
**Last updated:** [October 4, 2025, 2:41pm UTC](https://community.sonarsource.com/t/code-coverage-not-publishing-on-sonar-cloud-dashboard/149799 "2025-10-04T14:41:19Z")

</div>

We are using the dotnet tool to generate the code coverage report in coverage.xml. While running the Sonar scanner with the begin step, we are passing the parameter: /d:sonar.cs.vscoveragexml.reportsPaths=coverage.xml T…

---

## [Generic Test Coverage/Result formats vs. NUnit and OpenCover](https://community.sonarsource.com/t/generic-test-coverage-result-formats-vs-nunit-and-opencover/142069)

<div class="topic-metadata">

**Author:** [@marc.chu](https://community.sonarsource.com/u/marc.chu)\
**Replies:** 7\
**Last updated:** [July 2, 2025, 4:10pm UTC](https://community.sonarsource.com/t/generic-test-coverage-result-formats-vs-nunit-and-opencover/142069 "2025-07-02T16:10:27Z")

</div>

SonarQube Server Enterprise Deployment Trying to maximally exploit Code Coverage features I’ve only recently started utilizing my company’s enterprise instance of SonarQube Server, plugging it into my Jenkins pipelines…

---

## [OpenCover Code Coverage Issue - Only DLLs covered, not C# source files](https://community.sonarsource.com/t/opencover-code-coverage-issue-only-dlls-covered-not-c-source-files/143679)

<div class="topic-metadata">

**Author:** [@Vijay119](https://community.sonarsource.com/u/Vijay119)\
**Replies:** 1\
**Last updated:** [July 1, 2025, 11:20am UTC](https://community.sonarsource.com/t/opencover-code-coverage-issue-only-dlls-covered-not-c-source-files/143679 "2025-07-01T11:20:19Z")

</div>

We are using SonarCloud integrated with Azure DevOps pipelines using the predefined tasks such as SonarCloudPrepare@3, SonarCloudAnalyze@3, SonarCloudPublish@3. We are using the shared YAML pipeline template ( common te…

---

## [Code Coverage Dropped Greatly when switch to xUnit.v3](https://community.sonarsource.com/t/code-coverage-dropped-greatly-when-switch-to-xunit-v3/139585)

<div class="topic-metadata">

**Author:** [@groogiam](https://community.sonarsource.com/u/groogiam)\
**Replies:** 19\
**Last updated:** [May 8, 2025, 5:54pm UTC](https://community.sonarsource.com/t/code-coverage-dropped-greatly-when-switch-to-xunit-v3/139585 "2025-05-08T17:54:03Z")

</div>

We just migrated to xUnit.v3 and setup code coverage according this guide. Code Coverage with Microsoft Testing Platform \> xUnit.net. The coverage in my Sonar project as dropped 10% and no longer aligns with what is repo…

---

## [Coverage Report is not generating in sonar](https://community.sonarsource.com/t/coverage-report-is-not-generating-in-sonar/139475)

<div class="topic-metadata">

**Author:** [@Aditya88nikhade](https://community.sonarsource.com/u/Aditya88nikhade)\
**Replies:** 3\
**Last updated:** [April 30, 2025, 12:27pm UTC](https://community.sonarsource.com/t/coverage-report-is-not-generating-in-sonar/139475 "2025-04-30T12:27:12Z")

</div>

Hi Team, -I’m facing an issue while trying to import Visual Studio coverage into SonarQube during Azure DevOps pipeline execution. -Scanner\*\*: Azure DevOps SonarQubePrepare@7 / SonarScanner for MSBuild -Build agent OS…

---

## [Tsql code coverage report is not publishing in sonarcloud](https://community.sonarsource.com/t/tsql-code-coverage-report-is-not-publishing-in-sonarcloud/139113)

<div class="topic-metadata">

**Author:** [@skazure](https://community.sonarsource.com/u/skazure)\
**Replies:** 3\
**Last updated:** [April 24, 2025, 11:26am UTC](https://community.sonarsource.com/t/tsql-code-coverage-report-is-not-publishing-in-sonarcloud/139113 "2025-04-24T11:26:43Z")

</div>

Template for a good new topic, formatted with Markdown: Azure devops Trying to run unit test with code coverage for SQL database with SQL cover Using sql cover script i can now publish the code coverage result in ADO s…

---

## [SonarQube does not use the coverage report that is generated](https://community.sonarsource.com/t/sonarqube-does-not-use-the-coverage-report-that-is-generated/138173)

<div class="topic-metadata">

**Author:** [@qaz](https://community.sonarsource.com/u/qaz)\
**Replies:** 1\
**Last updated:** [April 7, 2025, 11:33am UTC](https://community.sonarsource.com/t/sonarqube-does-not-use-the-coverage-report-that-is-generated/138173 "2025-04-07T11:33:17Z")

</div>

version of SonarQube: Community Build 25.1.0.102122 (deployed via Helm in Kubernetes) version of sonar-scanner: SonarScanner CLI 7.0.2.4839 The issue I’m experiencing is that I’m creating a code coverage report for th…

---

## [How to upload Test Coverage, JaCoCo, Multi Module, Android](https://community.sonarsource.com/t/how-to-upload-test-coverage-jacoco-multi-module-android/137992)

<div class="topic-metadata">

**Author:** [@waffiqaziz](https://community.sonarsource.com/u/waffiqaziz)\
**Replies:** 3\
**Last updated:** [March 31, 2025, 4:34pm UTC](https://community.sonarsource.com/t/how-to-upload-test-coverage-jacoco-multi-module-android/137992 "2025-03-31T16:34:24Z")

</div>

Hi, I need help about how to upload test coverage. Currently my configuration: // build.gradle.kts (project root) plugins { ... id("org.sonarqube") version "6.0.1.5171" } sonar { properties { property("sonar…

---

## [Inconsistent code coverage results](https://community.sonarsource.com/t/inconsistent-code-coverage-results/136642)

<div class="topic-metadata">

**Author:** [@jose.jaramillo](https://community.sonarsource.com/u/jose.jaramillo)\
**Replies:** 1\
**Last updated:** [March 12, 2025, 3:08pm UTC](https://community.sonarsource.com/t/inconsistent-code-coverage-results/136642 "2025-03-12T15:08:42Z")

</div>

ALM used: Azure DevOps CI system used: Azure DevOps Scanner command used when applicable: Not applicable Languages of the repository: C# and C++ Only if the SonarCloud project is public, the URL: Not applicable, it is a…

---

## ['This analysis will make your organization' to reach the maximum allowed lines limit](https://community.sonarsource.com/t/this-analysis-will-make-your-organization-to-reach-the-maximum-allowed-lines-limit/133532)

<div class="topic-metadata">

**Author:** [@Rajeev\_G\_P](https://community.sonarsource.com/u/Rajeev_G_P)\
**Replies:** 5\
**Last updated:** [January 23, 2025, 7:25am UTC](https://community.sonarsource.com/t/this-analysis-will-make-your-organization-to-reach-the-maximum-allowed-lines-limit/133532 "2025-01-23T07:25:33Z")

</div>

Hi Team, i am getting this error: 'Task failed with status FAILED, Error message: This analysis will make your organization ‘’ to reach the maximum allowed lines limit (having 773759 lines). I have tried all the sonar…

---

## [Project assembly attribute is ignored](https://community.sonarsource.com/t/project-assembly-attribute-is-ignored/132332)

<div class="topic-metadata">

**Author:** [@Michael\_Sendow](https://community.sonarsource.com/u/Michael_Sendow)\
**Replies:** 2\
**Last updated:** [December 19, 2024, 4:10pm UTC](https://community.sonarsource.com/t/project-assembly-attribute-is-ignored/132332 "2024-12-19T16:10:43Z")

</div>

ALM used: Azure DevOps CI system used: Azure DevOps Languages of the repository: C# When setting \<ItemGroup\> \<AssemblyAttribute Include="System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute" /\> \</ItemG…

---

## [Coverlet - Missing some coverage measures in Sonarqube Server compared to coverlet standalone report](https://community.sonarsource.com/t/coverlet-missing-some-coverage-measures-in-sonarqube-server-compared-to-coverlet-standalone-report/132157)

<div class="topic-metadata">

**Author:** [@danzone](https://community.sonarsource.com/u/danzone)\
**Replies:** 2\
**Last updated:** [December 16, 2024, 11:59am UTC](https://community.sonarsource.com/t/coverlet-missing-some-coverage-measures-in-sonarqube-server-compared-to-coverlet-standalone-report/132157 "2024-12-16T11:59:17Z")

</div>

Hi all, I’m configuring a CI pipeline on Jenkins for a DotNET project and I want to add a step of source code analysis with code ceoverage info. I performed several attempts both in the Jenkins CI server (on a Linux mach…

---

## [Excluding files from code coverage at scan time in Go](https://community.sonarsource.com/t/excluding-files-from-code-coverage-at-scan-time-in-go/131474)

<div class="topic-metadata">

**Author:** [@Martin3DS](https://community.sonarsource.com/u/Martin3DS)\
**Replies:** 5\
**Last updated:** [December 10, 2024, 4:13pm UTC](https://community.sonarsource.com/t/excluding-files-from-code-coverage-at-scan-time-in-go/131474 "2024-12-10T16:13:32Z")

</div>

Hello, we are using SonarQube Server / Community Build (9.9.3 LTS) to scan our Go and JavaScript/Typescript projects. Now we have issues to reasonable meet the code coverage goals in the default quality gate and don’t w…

---

## [Is it possible show new code coverage metrics under Coverage menu in the Measures tab of a Portfolio](https://community.sonarsource.com/t/is-it-possible-show-new-code-coverage-metrics-under-coverage-menu-in-the-measures-tab-of-a-portfolio/131574)

<div class="topic-metadata">

**Author:** [@David\_Kav](https://community.sonarsource.com/u/David_Kav)\
**Replies:** 4\
**Last updated:** [December 6, 2024, 1:50pm UTC](https://community.sonarsource.com/t/is-it-possible-show-new-code-coverage-metrics-under-coverage-menu-in-the-measures-tab-of-a-portfolio/131574 "2024-12-06T13:50:39Z")

</div>

Must-share information (formatted with Markdown): We are using SonarQube Enterprise Edition - Version 8.9.10 I can’t find an answer to this question in the documentation or anywhere online: Managing portfolios I want t…

---

## ['No Coverage' after running some test cases in Intellij IDE but showing fine in SonarQube](https://community.sonarsource.com/t/no-coverage-after-running-some-test-cases-in-intellij-ide-but-showing-fine-in-sonarqube/130876)

<div class="topic-metadata">

**Author:** [@Sewak\_Reddy](https://community.sonarsource.com/u/Sewak_Reddy)\
**Replies:** 1\
**Last updated:** [November 22, 2024, 2:57pm UTC](https://community.sonarsource.com/t/no-coverage-after-running-some-test-cases-in-intellij-ide-but-showing-fine-in-sonarqube/130876 "2024-11-22T14:57:11Z")

</div>

I have created a new microservice in my spring boot project which uses jacoco as a sonar plugin. There are some test cases in a package that are not producing any coverage upon running in my local. It was showing No Cove…

---

## [How to identify "Condition Coverage on New Code"?](https://community.sonarsource.com/t/how-to-identify-condition-coverage-on-new-code/130628)

<div class="topic-metadata">

**Author:** [@Diego\_Froes](https://community.sonarsource.com/u/Diego_Froes)\
**Replies:** 3\
**Last updated:** [November 19, 2024, 4:58pm UTC](https://community.sonarsource.com/t/how-to-identify-condition-coverage-on-new-code/130628 "2024-11-19T16:58:51Z")

</div>

Hello everyone, good morning. When releasing a new Pull Request, submitting new code, Sonar is counting coverage of 99.7%, however, it does not inform which line of code is missing a test. Uncovered Conditions on New C…

---

## [Branch coverage mismatch](https://community.sonarsource.com/t/branch-coverage-mismatch/124816)

<div class="topic-metadata">

**Author:** [@Xav](https://community.sonarsource.com/u/Xav)\
**Replies:** 19\
**Last updated:** [September 27, 2024, 10:30am UTC](https://community.sonarsource.com/t/branch-coverage-mismatch/124816 "2024-09-27T10:30:51Z")

</div>

Hello Sonar team, SonarQube: 10.6EE SonarScanner: 5.0.1.3006 In our build, we’re producing 2 different lcov report: one for unit test and 1 for e2e tests and it looks like SonarQube has some problems with branch cove…

---

## [Difficulty Excluding Specific Folder and Contents in Go Project Sonar Analysis](https://community.sonarsource.com/t/difficulty-excluding-specific-folder-and-contents-in-go-project-sonar-analysis/124568)

<div class="topic-metadata">

**Author:** [@tanmesh](https://community.sonarsource.com/u/tanmesh)\
**Replies:** 1\
**Last updated:** [September 9, 2024, 4:25pm UTC](https://community.sonarsource.com/t/difficulty-excluding-specific-folder-and-contents-in-go-project-sonar-analysis/124568 "2024-09-09T16:25:49Z")

</div>

SonarQube version: \[Community Edition Version 9.9.3 (build 79811)\] Scanner: Sonar Scanner Container Image (sonarsource/sonar-scanner-cli:latest) Deployment: SonarQube deployed via zip. Goal: I want to exclude the /ent…

---

## [Sonarqube: Coverage-Only scans](https://community.sonarsource.com/t/sonarqube-coverage-only-scans/120761)

<div class="topic-metadata">

**Author:** [@Shash](https://community.sonarsource.com/u/Shash)\
**Replies:** 3\
**Last updated:** [August 19, 2024, 5:02pm UTC](https://community.sonarsource.com/t/sonarqube-coverage-only-scans/120761 "2024-08-19T17:02:03Z")

</div>

Hello team, We’re currently using Sonarqube Dev Edition. We know this question has been asked in the past but are looking to find a more up to date answer in case things have changed. We are looking to leverage SonarQub…

---

## [Code Smell on user branch gets flagged as a bug on main branch once merged](https://community.sonarsource.com/t/code-smell-on-user-branch-gets-flagged-as-a-bug-on-main-branch-once-merged/118167)

<div class="topic-metadata">

**Author:** [@Priyanka-Kotturi](https://community.sonarsource.com/u/Priyanka-Kotturi)\
**Replies:** 9\
**Last updated:** [July 30, 2024, 8:08am UTC](https://community.sonarsource.com/t/code-smell-on-user-branch-gets-flagged-as-a-bug-on-main-branch-once-merged/118167 "2024-07-30T08:08:04Z")

</div>

Hi Sometimes code smell on a user branch gets flagged as a bug on the main branch after the user branch gets merged into main. We want to understand what is the reason for this. Could you please help to understand the p…

---

## [Code Coverage is 0.0](https://community.sonarsource.com/t/code-coverage-is-0-0/117095)

<div class="topic-metadata">

**Author:** [@vivin](https://community.sonarsource.com/u/vivin)\
**Replies:** 1\
**Last updated:** [June 13, 2024, 8:09am UTC](https://community.sonarsource.com/t/code-coverage-is-0-0/117095 "2024-06-13T08:09:27Z")

</div>

Hi Team, i tried a lot but still not able to get the code coverage. its still 0. could you please help. its in github actions dotnet framework . please find the below yaml file name: Sonarqube on: push: branches…

---

## [No code coverage item displayed in measures](https://community.sonarsource.com/t/no-code-coverage-item-displayed-in-measures/116475)

<div class="topic-metadata">

**Author:** [@virgile](https://community.sonarsource.com/u/virgile)\
**Replies:** 1\
**Last updated:** [June 3, 2024, 4:49pm UTC](https://community.sonarsource.com/t/no-code-coverage-item-displayed-in-measures/116475 "2024-06-03T16:49:55Z")

</div>

Hi I use sonar scanner to analyse code and code coverage, but I don’t see the item “coverage” in measures for PR. the coverage.xml is well generated with gcovr. in sonar-project.properties sonar.cfamily.gcov.reportsPa…

---

## [Code Coverage 0% in SonarCloud](https://community.sonarsource.com/t/code-coverage-0-in-sonarcloud/115369)

<div class="topic-metadata">

**Author:** [@MJHDiepman](https://community.sonarsource.com/u/MJHDiepman)\
**Replies:** 2\
**Last updated:** [May 31, 2024, 7:26am UTC](https://community.sonarsource.com/t/code-coverage-0-in-sonarcloud/115369 "2024-05-31T07:26:58Z")

</div>

ALM used: Azure DevOps CI system used: Azure DevOps Languages of the repository: c# The code coverage is correctly displayed in Azure Devops, but remains empty in SonarCloud. It worked before, but stopped working a cou…

---

## [Code coverage scan for VB6](https://community.sonarsource.com/t/code-coverage-scan-for-vb6/115007)

<div class="topic-metadata">

**Author:** [@Somnath\_Das](https://community.sonarsource.com/u/Somnath_Das)\
**Replies:** 1\
**Last updated:** [May 10, 2024, 6:33am UTC](https://community.sonarsource.com/t/code-coverage-scan-for-vb6/115007 "2024-05-10T06:33:01Z")

</div>

Hi Based on the article, it’s clear that the Sonar Enterprise edition can conduct scans on VB6 by adjusting specific settings. However, I am curious to know if Sonar can also perform code coverage scans for VB6. If it …

---

## [Want to understand more about Sonar code coverage filter defined in Quality gate?](https://community.sonarsource.com/t/want-to-understand-more-about-sonar-code-coverage-filter-defined-in-quality-gate/114600)

<div class="topic-metadata">

**Author:** [@Somnath\_Das](https://community.sonarsource.com/u/Somnath_Das)\
**Replies:** 5\
**Last updated:** [May 8, 2024, 12:20pm UTC](https://community.sonarsource.com/t/want-to-understand-more-about-sonar-code-coverage-filter-defined-in-quality-gate/114600 "2024-05-08T12:20:29Z")

</div>

We’re utilizing SonarQube. Within Sonar, we’ve identified the capability to enable Quality Gates or Sonar Way (legacy), which encompasses code coverage testing. I am curious if just enabling the Quality Gate/Sonar Way (…

---

## [Code coverage for dotnet records without primary constructors](https://community.sonarsource.com/t/code-coverage-for-dotnet-records-without-primary-constructors/114569)

<div class="topic-metadata">

**Author:** [@John\_Harman](https://community.sonarsource.com/u/John_Harman)\
**Replies:** 2\
**Last updated:** [May 1, 2024, 10:20am UTC](https://community.sonarsource.com/t/code-coverage-for-dotnet-records-without-primary-constructors/114569 "2024-05-01T10:20:38Z")

</div>

We are seeing that c# records that do not use a primary constructor are being shown as receiving no code coverage, when the rest of the record is clearly used and tested. I can’t work out what sort of test would stop …

---

## [Not able to get coverage report (json or cobertura) on SonarQube Dashboard](https://community.sonarsource.com/t/not-able-to-get-coverage-report-json-or-cobertura-on-sonarqube-dashboard/112878)

<div class="topic-metadata">

**Author:** [@shubh](https://community.sonarsource.com/u/shubh)\
**Replies:** 9\
**Last updated:** [April 18, 2024, 2:24pm UTC](https://community.sonarsource.com/t/not-able-to-get-coverage-report-json-or-cobertura-on-sonarqube-dashboard/112878 "2024-04-18T14:24:39Z")

</div>

The following are the details: SonarQube version: Not sure about this Scanner version: sonar scan of version 6.2.0 Plugin(s) version: cobertura.xml version - 1.9 Any relevant extension version: \[specify version\] Sonar…

[Next page](https://community.sonarsource.com/tag/code-coverage/419.md?match_all_tags=true&page=1&tags%5B%5D=code-coverage)
