Python code coverage in Bamboo: Cobertura output

Hi,

I'm running projects built with Python and Javascript, and would like code coverage reports together with my Bamboo builds.

I know about the tools (Nose for Python with the coverage package, Karma-coverage for JS) that could generate me Cobertura compatible XML output, thus I would like to know if you have any support for these?

2 answers

1 accepted

Bamboo doesn't support coverage reports in Cobertura format, but look here (https://github.com/tumb1er/bamboo-build-tools) for script which converts XML from Cobertura format to Clover. Then you can upload this XML as clover report on Miscellaneous tab of a job. So you will track changes in code coverage.

cobertura-clover-transform doesn't create full clover report, you could use it for tracking historical changes of cover ratio. The only way to get the full coverage report is to create html report by nose2: 

nose2 --with-cov --cov-report html testfoo

and attach it to a build as artifact.

Screen Shot 2016-02-09 at 20.35.13.png

@Andrey Oleynik, worked perfectly.  Much appreciated.

Or you could try coveralls.io. We use the coverage output generated by nose and the send that to coveralls. There are two Lutton libraries you can choose from that make it easy to link bamboo with coveralls and then you will have a full history of code coverage. 

Suggest an answer

Log in or Join to answer
Community showcase
Renan Battaglin
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,077 views 0 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot