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

This widget could not be displayed.
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. 

This widget could not be displayed.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted yesterday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

81 views 0 1
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