robotframework rebot-与自定义报告合并,而不是report.html

时间:2019-10-09 07:11:33

标签: python shell selenium automated-tests robotframework

我有一个--rerunfailed pybot用于重新运行失败的案例,但是最终报告始终显示为report.html

我需要使用自定义名称而不是报告

pybot --noncritical mayFail --suitestatlevel 2 --output "report_details/reportdetail".xml --log "report_details/reportlog".html --report "testreport".html \
--argumentfile "$DIR/../../web.args" || pybot --**rerunfailed** "report_details/firstreport.xml" --noncritical mayFail --suitestatlevel 2 --output "report_details/reportrerun.xml" --log "report_details/reportlog".html --report "testreport.html" \
--argumentfile "$DIR/../../web.args" || rebot --merge "report_details/firstreport.xml" "report_details/reportrerun.xml" --name "test.html"

如果我在合并中不使用(--name“ test.html”)或(--output“ test.html”),则会得到名称为report.html的报告

在上面的示例中,用

代替了test.html 我收到以下错误

[错误]读取xml源'--name'失败:没有这样的文件或目录

我还尝试了-r->与以前相同的错误

1 个答案:

答案 0 :(得分:2)

使用rebot命令时,xml文件应该是最后一个参数。尝试将顺序更改为此:--name "test.html" "report_details/reportrerun.xml"

docs中,它说得很清楚:Usage: rebot|jyrebot|ipyrebot [options] robot_outputs