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

Duncan Findlay duncan at duncf.ca
Thu Jul 21 20:18:42 PDT 2011


On Jul 19, 2011, at 10:25 PM, 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.

Great, thanks!

I took a look today and it seems to do most of what I want, although I was hoping for something closer to a drop in replacement for "unit2 discover". I'll see if I can build on it and maybe contribute a patch or two.

Duncan


More information about the testing-in-python mailing list