如何告诉rebot.py在哪里放置日志和报告?

时间:2013-05-15 12:59:00

标签: logging report robotframework

我想在脚本中使用rebot.py来创建日志和报告并将其放入给定的文件夹中。记录和报告参数不起作用:

milo@automoso:~/temp/demoproject> ./rebot demo_output.xml --log /home/autotest/milo/robot_logs/log.html --report /home/autotest/milo/robot_logs/report.html
[ WARN ] Arguments '--log', '/home/autotest/milo/robot_logs/log.html', '--report' and '/home/autotest/milo/robot_logs/report.html' did not exist and were ignored. Validate the used command line syntax.
Log:     /home/milo/temp/demoproject/log.html
Report:  /home/milo/temp/demoproject/report.html

1 个答案:

答案 0 :(得分:1)

选项必须在输出文件的名称之前。将“demo_output.xml”移动到命令的末尾。否则,rebot认为所有这些参数都是输出文件的名称。

./rebot --log /home/autotest/milo/robot_logs/log.html --report /home/autotest/milo/robot_logs/report.html demo_output.xml 

如果您运行命令rebot --help,它将在打印输出的顶部显示此用法:

Usage:  rebot|jyrebot|ipyrebot [options] robot_outputs
   or:  python|jython|ipy -m robot.rebot [options] robot_outputs
   or:  python|jython|ipy path/to/robot/rebot.py [options] robot_outputs
   or:  java -jar robotframework.jar rebot [options] robot_outputs