Nice Html Reports For Pyunit
Do you know a tool for creating nice html reports for pyunit?
Solution 1:
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
Solution 2:
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.
Post a Comment for "Nice Html Reports For Pyunit"