robotframework - 如何在 log.html、report.html、output.xml 等机器人框架中保存日志,其中包含 ex log.html-> logxyz.html、abcreport.html 的特定名称?
问题描述
我正在尝试将具有特定名称的日志保存在机器人框架中,但无法做到这一点。我们有办法用我们想要的名称保存日志名称吗?如果是,那么该怎么做?
解决方案
您可以使用以下选项来配置输出文件:
-d, --outputdir <dir> Defines where to create output files. -o, --output <file> Sets the path to the generated output file. -l, --log <file Sets the path to the generated log file. -r, --report <file> Sets the path to the generated report file.
因此,要更改日志文件的名称,请像这样启动您的测试:
robot --log logxyz --report abcreport my_robot.robot
您可以查看 Robot Framework User Guide 中的所有命令行选项以了解更多信息。
使用-T
,--timestampoutputs
您也可以在输出文件的名称中添加时间戳。一个带有:--log
的示例名称。--timestampoutputs
my_log_file_name-20190103-102712.html
推荐阅读
- raspberry-pi - 电子生成器输出错误:不支持压缩器“xz”
- r - R复杂数据框重塑
- jestjs - 如何在 Jest 中收听自定义 Svelte 事件
- python - Speedwise,Pharo 与 Python3 相比如何?
- php - PHP计算关联数组键?
- postgresql - postgres 创建扩展无效支持功能
- c - 如果我们将整数指针指向字符数组的开头并取消引用它会发生什么?
- java - Spring Web - AsyncHandlerInterceptor 中的两个连续 HTTP 请求,而 HTTP 500?
- python - 如何遍历我的数据系列并返回一个列表而不是单个值?
- arduino - 如何为此编写开关盒和串行读取?