[TIP] Getting py.test to output xcoverage/cobertura format data (and play nice with Hudson)

Chris Rose offline at offby1.net
Tue Feb 22 15:00:24 PST 2011


Yep, that's the solution I need. Thanks to all who replied!

-- 
Chris Rose
Not to be taken literally, internally, or seriously.
On Tuesday, February 22, 2011 at 4:33 AM, meme dough wrote: 
> Hi,
> 
> Guess people already worked this out, but pytest-cov supports writing
> the coverage xml report from all hosts / cores / subprocesses which
> can then be directly put into hudson / jenkins cobertura plugin.
> 
> :)
> 
> On 17 February 2011 05:41, Ned Batchelder <ned at nedbatchelder.com> wrote:
> > Keep in mind that once you run coverage with the py.test plugin, there is a
> > .coverage data file left behind.  That file can then be used to generate
> > reports directly from coverage, outside of any test runner.  So once you've
> > run your tests, use "coverage xml" to create an XML file from the .coverage
> > data file.
> > 
> > --Ned.
> > 
> > On 2/16/2011 12:14 PM, Chris Rose wrote:
> > 
> > I'd like to try out py.test; I've found that it's nicer output-wise than
> > nose in a lot of respects. However, we have a significant in-house
> > investment in Hudson/Jenkins automated testing that currently depends on
> > nose + xcoverage + xunit output to tie into the Hudson xUnit/Cobertura
> > plugin support for tracking test coverage and successes.
> > Is there a clear process for tying these things together? I see the
> > --junitxml output flag, so that's part of the issue solved, but it doesn't
> > handle coverage.
> > 
> > --
> > Chris
> > Not to be taken literally, internally, or seriously.
> > 
> > _______________________________________________
> > testing-in-python mailing list
> > testing-in-python at lists.idyll.org
> > http://lists.idyll.org/listinfo/testing-in-python
> > 
> > _______________________________________________
> > testing-in-python mailing list
> > testing-in-python at lists.idyll.org
> > http://lists.idyll.org/listinfo/testing-in-python
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20110222/bb878e6a/attachment.htm>


More information about the testing-in-python mailing list