I wrote an XML Test Runner for PyUnit, Python's unit test suite. It writes the results of a test run to an XML file instead of printing it to the console and is compatible with the output from JUnit. This allows easy integration into automatic build tools like CruiseControl.
The following files are example configuration files for CruiseControl that can help you to configure it for PyUnit integration. They integrate unit tests as well as acceptance tests. Both kinds of tests are assumed to be PyUnit tests, but the failure of acceptance tests is treated as non-critical. (Unfortunately PyUnit lacks functionality to ignore test failures, which would be well suited to acceptance tests.)
- config.xml — main CruiseControl configuration
- build-myproject.xml — a simple Ant build file that calls build-myproject.py
- build-myproject.py — Python build script
- xslt/report2html.xsl — XSLT stylesheet that converts XML build reports to XHTML
- xslt/acceptance-wrap.xsl — XSLT stylesheet required by build-myproject.py to distinguish between unit and acceptance tests