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

1 vote
Accepted answer
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 Sign up to answer
Community showcase
Posted Monday in Confluence

Organizing your space just got easier - Page Tree Drag & Drop is here

Hi Community! I’m Elaine, Confluence Product Manager. You may have read my earlier post about page tree in space navigation sidebar. I'm excited to share another improvement that helps you organize ...

56 views 3 2
Join discussion

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