Get XML coverage reports from nose

When [hooking up Hudson and Django][hudson-django], I needed a way to get XML coverage reports.

At the time I [forked nose][heisel-nose] itself, but I wasn’t happy with the solution. Folks rightly wouldn’t want to use my fork; I don’t want to commit to keeping up with nose’s development; and [duh, they have a plugin architecture][nose-plugins].

So I’m happy to announce [nose-xcover][nose-xcover]. Install it and it’ll add the –with-xcoverage option which you can use alongside the built-in plugin like so:

#nosetests –with-coverage {{ coverage options }} –with-xcoverage
nosetests –with-coverage –cover-package=myapp –cover-tests –with-xcoverage

I updated my [Django and Hudson guide][hudson-django] to use this instead of the fork.

I hope you find it useful!

[hudson-django]: http://heisel.org/blog/2009/11/21/django-hudson/
[heisel-nose]: http://bitbucket.org/cmheisel/nose/src/
[nose-plugins]: http://somethingaboutorange.com/mrl/projects/nose/0.11.1/plugins/writing.html
[nose-xcover]: http://github.com/cmheisel/nose-xcover

About Chris

Python developer, Agile practitioner trying desperately not to be a pointy haired boss.
This entry was posted in Django, Projects, Python. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s