pyunit的漂亮html报告 [英] nice html reports for pyunit
本文介绍了pyunit的漂亮html报告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你知道一个为pyunit创建漂亮html报告的工具吗?
我建议如下:- 使用鼻子运行测试
- 创建一个将结果输出为HTML的鼻插件。鼻子示例代码有一个简单的HTML输出插件( https ://raw.github.com/nose-devs/nose/master/examples/html_plugin/htmlplug.py )。您至少可以将它用作起点。
鼻子插件文档: http://nose.readthedocs.org/en/latest/index.html
另一种选择:
- 鼻子可以将测试结果输出为NUnit兼容的XML:
nosetests --with-xunit
。这将在当前目录中生成一个nostests.xml
文件。 有些解决方案可将此XML转换为HTML:
- 例如,Hudson / Jenkins在浏览器中将XML测试结果显示为HTML。
- 如何转换将NUnit输出到HTML报告中
- http://www.google.com/search?&q=nunit+xml+to+html
Do you know a tool for creating nice html reports for pyunit?
解决方案
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
这篇关于pyunit的漂亮html报告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文