Do you know a tool for creating nice html reports for pyunit?
codeape
I suggest the following:
- Run your tests using nose
- Create a nose plugin that outputs results as HTML. The nose example code has a simple HTML output plugin (https://raw.github.com/nose-devs/nose/master/examples/html_plugin/htmlplug.py). You can probably use that, at least as a starting point.
Nose plug-in documentation: http://nose.readthedocs.org/en/latest/index.html
Another option:
- Nose can output test results as NUnit-compatible XML:
nosetests --with-xunit
. This will produce anostests.xml
file in the current directory. - There are solutions to convert this XML to HTML:
- For instance, Hudson/Jenkins displays XML test results as HTML in the browser.
- How to convert NUnit output into an HTML report
- http://www.google.com/search?&q=nunit+xml+to+html
there has a simple HTMLTestRunner developed for pyunit, here is link
The shortage of it is there are no output in console, because sys.stdout and sys.stderr was captured by HTMLTestRunner. Except above, others works fine to me.
来源:https://stackoverflow.com/questions/767377/nice-html-reports-for-pyunit