Python code coverage in Bamboo: Cobertura output

Viktor Nagy April 3, 2014

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
Answer accepted
Andrey Oleynik July 21, 2014
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.
johnthagen February 9, 2016
Andrey Oleynik February 9, 2016

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

johnthagen February 9, 2016

@Andrey Oleynik, worked perfectly.  Much appreciated.

Don McIntosh March 6, 2016

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. 

0 votes
johnthagen February 5, 2016

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events