I have an acceptance test case, the result is plain text. I want to use Jenkins to show the result, and the JUnit format is suitable for me.
So I want to check whether t
you can use junitxml (Python JUnit XML reporter)
on PyPI: http://pypi.python.org/pypi/junitxml
if you had a standard unittest
test suite called suite
. you could run it, and write results to an xml file like this:
import junitxml
fp = file('results.xml', 'wb')
result = junitxml.JUnitXmlResult(fp)
result.startTestRun()
TestSuite(suite).run(result)
result.stopTestRun()
or to discover tests and print xml to stdout:
python -m junitxml.main discover
another option is to use nose and run your suite with:
nosetests --with-xunit