Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Rest API for Code Insight Code Coverage for BitBucket Server 7

bfierz May 26, 2020

Hi,

Is there an official Rest-API to add statement coverage information to an insight report? According to this overview, it should be possible: https://confluence.atlassian.com/bitbucketserver/code-insights-966660485.html

However, I cannot find anything in the official documentation: https://docs.atlassian.com/bitbucket-server/rest/7.2.3/bitbucket-code-insights-rest.html

The only way I can add statement coverage is by using the unsupported plugin: https://marketplace.atlassian.com/apps/1218271/code-coverage-for-bitbucket-server?hosting=server&tab=overview

Thank you

1 answer

1 accepted

0 votes
Answer accepted
Kristy
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 26, 2020

Hi @bfierz

Code coverage has not been implemented as a core feature in Bitbucket Server yet. However, there is an API that can be consumed by plugins to provide this information.

The plugin you linked is one such plugin that consumes this API, and it was developed by Atlassian. However, as you mentioned it is not supported. You could also write your own plugin that uses the API, which can be found here.

 

Out of curiosity, what tool do you use for CI and code coverage? Its always useful to gather some customer feedback to help us prioritise features and develop the best solutions for you :)

 

Hope that helps.

 

Regards,

Kristy

Engineer on Bitbucket Server

bfierz May 26, 2020

Hi,

we are using Jenkins for CI. As most of our work happens on windows we are using OpenCppCoverage for the job.

I was already successfully using the mentioned plugin on the 6.x series with a custom generator OpenCppCoverage, I will continue using this plugin in this case.

Thank you

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events