阅读: 230
答案 1:
RF执行完毕后,默认生成 xml 格式的输出文件、-tml格式的report和log文件。xml 格式的输出是RF的详细执行信息,report和log基于该文件生成。如果要进行微调,可以使用rebot重新生成report和log。详情可以查看rebot的参数:rebot ---elp如果要对报告的样式、格式做深入的修改,可以编写自己的格式化工具,从xml文件中读取执行数据,生成完全定制的报告。下面是一个解析RF xml输出的简单例子,pyt-on语言编写:from robot.output import TestSuitedef walk_testcase(suite): for test in suite.tests: yield test for sub_suite in suite.suites: for test in walk_testcase(sub_suite): yield testsuite = TestSuite("output.xml")for test in walk_testcase(suite): print test.status, test.name另外,如果自己来生成报告,建议在运行pybot时,关闭默认的report和log:pybot --report none --log none分享常识给亲友.
下一篇:国内很多事故的报道中,经济损失高达-亿元,这些数字是如何统计出来的? 下一篇 【方向键 ( → )下一篇】
上一篇:戴-眼镜对眼睛有什么危害吗? 上一篇 【方向键 ( ← )上一篇】
快搜