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 edited

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

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.

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, bitbucket, ci/cd workflows, scale ci cd, bitbucket webinar, devops pipeline, continuous integration, continuous delivery, atlassian learning, software automation, developer tools, build and deploy, pipeline optimization, atlassian community

Scale CI/CD workflows faster with Bitbucket Pipelines 🪣

Join this webinar on June 25/26th to learn how to build secure CI/CD workflows using Bitbucket Pipelines and get tips from our own engineers on how to speed up builds and operate at scale.

Register today
AUG Leaders

Atlassian Community Events