我想在脚本中使用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
答案 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