Code coverage bars not shown in bitbucket server pull request

We’re evaluating SonarQube 7.9.1 developer edition and it’s integration with Bitbucket server for Java projects. Our intention is to have the analysis results and test coverage shown in the pull requests on the Bitbucket interface.

I have most of it working, but do not see any red/green coverage bars in the diff view on the pull request in bitbucket:
The pull request does get decorated to some degree. It shows the SonarQube code insight option that pops up the quality report.
The pull request diff view does get decorated with code smells, and the coverage bars are shown in the sonarqube web interface, but the PR is not decorated with coverage bars.

So, am I right to expect that the coverage bars should also show in bitbucket?
Does this need to be configured/enabled separately anywhere?
I don’t see it mentioned on the sonar pull requests setup documentation.

(We’re on an older bitbucket server 5.16, if that matters)

Hi @robertd,

Thanks for your feedback,

Yes that’s right, the coverage bars are not intended to be shown in bitbucket, only in SonarQube.
That’s a good input to take into account and I’d be happy to know if other users would have this need as well.


Hi Aurelie, oh ok, thanks for the confirmation.

I’ve only just started evaluating SonarQube, but with our current workflows we would find code coverage decorations very useful. A lot of our ‘conversation’ around reviews happens in the pull request comments, so having the test coverage right there would streamline things.

I realise this means less trips over to the nice sonar interface, but at the end of the day I want to improve the efficiency and effectiveness of reviews and I can imagine that jumping backwards and forwards between different systems doesn’t help.

Anyway, thanks again.

1 Like

@aurelie, This feature seems to be available for github and gitlab, but not for bitbucket. Is there a ticket number to track if/when this integration will be added?

Hi @Sroca,

Welcome to our community forum!

I’m not aware that this is available for GitHub and GitLab, would you mind pointing out to me what makes you think that ?


For what it’s worth, I would like to see this feature added. Being able to see new lines of code with missed or partial test coverage during peer review in BitBucket would be incredible. Obviously we can get the same by opening Sonarqube, but to have to switch back and forth between two systems to see the coverage and then leave review comments is just one extra step that could be avoided if this feature is added.