Code coverage is showing incorrectly in Sonarqube project UI

Make sure to tell us:

  • What version are you upgrading from?
    We have upgraded from 8.9 to 9.9
  • System information (Operating system, Java version, Database provider/version)
    Linux
  • What’s the issue you’re facing?
    Code coverage for our application is showing as 100% when scanned locally and it is showing that 4 lines were not covered in the sonarqube. Kindly let us know the reason

Hi,

Welcome to the community!

You haven’t given a lot to work with.

Perhaps this blog post will help.

 
Ann


This is local sonarqube analysis

same is showing as failing in sonarqube, Our customers are being impacted with this. Kindly help at the earliest. This is urgent request.

ganncamp , kindly help at the earliest

The above doc that u have shared is not related to us

Hi,

Per the FAQ:

I created a topic, when can I expect a response?

This is an open community with people volunteering their free time to provide assistance. We’re eager to contribute to the community, but you are not guaranteed a fast response.

Be patient

  • Wait a few days before bumping a topic that hasn’t received a response.

Regarding your question, the screenshots are helpful. They show that the file has some lines covered. That means the file is included in a coverage report. And when that’s the case, we go 100% by what the coverage report says.

So you need to figure out why your two different(?) sets of tooling provide different numbers.

 
HTH,
Ann