一直在使用Nose-html-reporting,并输出html报告,但今天在使用时发出有点问题;于时,将python目前可能的html报告插件下载后进行对比,如下

一、Nose-html-reporting 0.2.3

这个html报告在之前的nose系列教程中用的都是这个模板

python nose测试框架全面介绍九---各种html报告插件对比

但在实际使用过程中,有的工程在生成报告提会提示以下错误:

File "/usr/lib/python2.7/site-packages/nose_html_reporting/__init__.py", line 251, in addError

    exc_val if isinstance(exc_val, exc_type) else exc_type(exc_val),

TypeError: __init__() takes exactly 3 arguments (2 given)

 

不明觉历,不去深究了吧。

 

二、Nosehtmloutput-2.1.0

前身是nosehtmloutput 0.0.5,效果如下

python nose测试框架全面介绍九---各种html报告插件对比

skip和成功用例没有颜色标识

 

三、nose-html 1.1

就是写unittest Htmltestrunner那台湾哥们写的,不支持python3,效果如下:

python nose测试框架全面介绍九---各种html报告插件对比

蛋疼的,skip用例尽然没有显示,点击错误的尽然弹出新框,只能说太不用心了

python nose测试框架全面介绍九---各种html报告插件对比

 

四、nose-htmloutput 0.6.0

python nose测试框架全面介绍九---各种html报告插件对比

这样的,用了jinjia2去渲染,个人不太喜欢这种风格

 

五、nose2-html-report 0.6.0


和上面类似,但只支持nose2,运行方式也特别独特,为nose2 –html-report,可惜我还在用nose1.3.7 这里就不演示了

 

六、NoseHTML 0.4.4


效果如下:

python nose测试框架全面介绍九---各种html报告插件对比

也没有skip,显示也蛮不人性化的

 

相信聪明的你,不用我说,都知道哪个html插件适合你了吧..................

相关文章:

  • 2021-12-07
  • 2021-11-19
  • 2021-08-17
  • 2021-07-23
  • 2022-12-23
  • 2021-11-07
  • 2022-12-23
猜你喜欢
  • 2021-07-19
  • 2021-11-19
  • 2022-02-11
  • 2022-12-23
  • 2022-12-23
  • 2021-06-25
相关资源
相似解决方案