This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: XML Test Runner for unittest module
Type: Stage:
Components: Library (Lib) Versions: Python 2.4
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: collinwinter, srittau
Priority: normal Keywords: patch

Created on 2006-07-14 18:02 by srittau, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
xmlrunner.py srittau, 2006-07-14 18:02 XmlTextRunner implementation
xmlrunner.py srittau, 2006-07-27 09:22 Updated XmlTestRunner
Messages (4)
msg50700 - (view) Author: Sebastian Rittau (srittau) * Date: 2006-07-14 18:02
JUnit features an XML Test Runner that enables test
output in XML format. This is very useful for buildbots
and similar automated setups. PyUnit (the unittest
module) lacks this capability. The attached file
implements such an XML Test Runner and the matching
unit tests. I did not try to generate a patch to the
current SVN version and leave that to more capable
hand. I think the current unittest module should
probably changed into a unittest package like this:

unittest/__init__.py - the current unittest.py file
unittest/xmlrunner.py - the new XML runner

Later __init__.py could be split into even more files
like textrunner.py etc.

I would like to hear about any improvements that the
patch needs (even minor ones).
msg50701 - (view) Author: Collin Winter (collinwinter) * (Python committer) Date: 2006-07-17 18:02
Logged In: YES 
user_id=1344176

I'd recommend that you release this somewhere like PyPI
(http://cheeseshop.python.org/pypi) and see how well it
does. If it flies off the shelf, then it could be considered
for inclusion in the stdlib.
msg50702 - (view) Author: Sebastian Rittau (srittau) * Date: 2006-07-27 09:22
Logged In: YES 
user_id=47380

I attached an updated patch. It includes feedback by Mirko
Friedenhagen: XmlTestRunner.run now returns the TestResult
instead of a boolean, it is now possible to stream multiple
test results into a single XML stream, since the XML
declaration is left out, if no new file is created, and
XmlTestRunner now gracefully recovers from tests overriding
sys.stdout and sys.stderr.
msg50703 - (view) Author: Collin Winter (collinwinter) * (Python committer) Date: 2007-03-08 00:45
As noted in an earlier comment, this needs to spend some time out in the Cheeseshop and build up a following before being included in the stdlib; closing.
History
Date User Action Args
2022-04-11 14:56:18adminsetgithub: 43676
2006-07-14 18:02:57srittaucreate