The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Rest API for Code Insight Code Coverage for BitBucket Data Center

HALABI_ David
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 2, 2024

Hi!

In a few days, we're going to migrate from BitBucket Server to BitBucket Data Center.
As stated in the documentation page https://confluence.atlassian.com/bitbucketserver/code-insights-966660485.html, it is possible to see the code coverage in the BitBucket pull requests.
However, I've already tried the Code Insights REST API, but surprisingly, it's not possible to deal with the code coverage.

I can see 3 solutions:

  1. use of a third party (mainly SonarQube)
  2. use of the this Atlassian plugin
  3. write a plugin from scratch for enhancing the CodeInSights capabilities

Normally, tagging a line with one of a 3 values [covered, partially covered, uncovered] should be super easy, especially as annotations are already available. I really don't need to get a big solution like SonarQube for this basic code coverage display feature.
I've considered to write my own extension but not only it would take some time, but also the documentation is far too basic to successfully doing it. Which leaves the option of using the above Atlassian plugin.

My questions are:

  1. is this plugin compatible with the BitBucket Data Center version? We don't want to use the Cloud version for now.
  2. if not, is there any more extensive documentation about the Code Insights coverage API, hopefully with some examples?
  3. is there any other way to tell BitBucket that some lines are [covered, partially covered, uncovered] ?

Thanks a lot, I'm sure I'm not the only one to expect this feature that is, I do insist, available in the documentation and the BitBucket GUI (check box 'Code coverage' in the configuration wheel).

EDIT: may I hope an answer some day???!

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
alexander911
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 24, 2025

I'm also interested in this question and looking for an answer. Actually, my integration flow is the next:

  • First, I create a pull request in Bitbucket,
  • Then I have pipelines in Bamboo where my SonarQube analysis runs.

So I just want to have the clean way and clean height how can I to integrate code coverage with my pull requests.

TAGS
AUG Leaders

Atlassian Community Events