[TIP] unittest2 xml output / integration with Jenkins/Hudson

Michael Foord michael at voidspace.org.uk
Wed Jul 20 10:33:42 PDT 2011


On 20/07/2011 06:25, Robert Collins wrote:
> On Wed, Jul 20, 2011 at 4:11 PM, Duncan Findlay<duncan at duncf.ca>  wrote:
>> Hi all,
>>
>> I've got a bunch of unit tests written with unittest2 (Python 2.4 and 2.6) and I want to set up Jenkins to display unit tests status. I'm looking for something "production-ready" (for some definition thereof) that will allow me to discover and run unit tests with XML output.
>>
>> I have been using the unittest2 plugins branch, but that's not "production ready" (I had to patch it to get it to run). It seems like many of the other common solutions (e.g. nose) don't like it when test cases are subclasses of unittest2.TestCase instead of unittest.TestCase.
>>
>> I'm sure I'm not the only one trying to do something like this. What's everyone else doing?
>>
> I wrote http://pypi.python.org/pypi/junitxml specifically for this use
> case. Its used by (amongst others) the drizzle project for hudson
> integration.

We're using junitxml at work and I can heartily plus one it. Although I 
wouldn't guarantee that it supports the unittest2 test skipping / 
expected failures - however that isn't necessarily a problem as 
unittest2 can cope with this (they become passes).

The unittest2 plugins branch is very, very far from being production 
ready...

Michael

>
> Cheers,
> Rob
>
> _______________________________________________
> testing-in-python mailing list
> testing-in-python at lists.idyll.org
> http://lists.idyll.org/listinfo/testing-in-python


-- 
http://www.voidspace.org.uk/

May you do good and not evil
May you find forgiveness for yourself and forgive others
May you share freely, never taking more than you give.
-- the sqlite blessing http://www.sqlite.org/different.html




More information about the testing-in-python mailing list