how to customize robot framework test reports [closed]

你说的曾经没有我的故事 提交于 2019-12-24 00:54:42

问题


I want to customize robot framework test report, in order to fit my need. Where can I find the related python source that handle this feature?

Or I need to create a 3rd party library to handle this?


回答1:


One solution is to create your own report from scratch. The XML output is very easy to parse. You can turn off the generation of reports with command line options (eg: --log NONE and --report NONE). Then, create a script that generates any type of report that you want.




回答2:


One method, kind of lame but workable, is to use the keyword, 'Set Test Message'. This lets you put text into the test message column of the report. Whenever the test passes, you will see the message. If it fails, you see the normal failure message.

It would be great to be able to dynamically insert a documentation line, though. I'd love to be able to have the keyword, "Set Documentation Message" so that in the keyword logic I could set it, instead of copying a '[Documentation] blah, blah, blah' onto every line that it applies to.




回答3:


You can customize the robot framework using the steps mentioned in the following steps. Robo Report

You can get a html report that looks like HTML Report




回答4:


You can directly modify the template located at

/usr/local/lib/python2.7/dist-packages/robot/htmldata/rebot/


来源:https://stackoverflow.com/questions/6120893/how-to-customize-robot-framework-test-reports

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!