【问题标题】:How to save JMeter Report with Timestamp added in ReportName如何在 ReportName 中添加时间戳保存 JMeter 报告
【发布时间】:2018-12-07 07:18:38
【问题描述】:

我正在通过命令提示符生成 JMeter HTML 报告。我想用时间戳保存报告,以便将来我可以比较这些报告。如果我尝试执行而不清除报告文件夹,则会收到以下错误消息,

警告:无法在根 0x80000002 打开/创建首选项根节点 Software\JavaSoft\Prefs。 Windows RegCreateKeyEx(...) 返回错误代码 5。 发生错误:无法写入“D:\AgileCockpit_IntegrationTest\HtmlReports”,因为文件夹不为空 错误级别=1

我正在使用以下命令执行, jmeter -n -t D:\AgileCockpit_IntegrationTest\AgileCockpitIntegrationTest.jmx -l D:\AgileCockpit_IntegrationTest\Result\Result1.csv -e -o D:\AgileCockpit_IntegrationTest\HtmlReports\

与 CSV 文件相同。

请帮助我...在此先感谢。

【问题讨论】:

    标签: jmeter jmeter-plugins jmeter-4.0


    【解决方案1】:

    您可以使用 Windows datetime 命令组合为 .jtl 结果文件和 HTML 报告仪表板文件夹添加时间戳,例如:

    jmeter -n -t D:\AgileCockpit_IntegrationTest\AgileCockpitIntegrationTest.jmx -l "D:\AgileCockpit_IntegrationTest\Result\%date:~-4%-%date:~3,2%-%date:~0,2%-%time:~0,2%-%time:~3,2%-%time:~6,2%.jtl" -e -o "D:\AgileCockpit_IntegrationTest\HtmlReports\%date:~-4%-%date:~3,2%-%date:~0,2%-%time:~0,2%-%time:~3,2%-%time:~6,2%"
    

    可以使用Merge Results工具比较不同的结果文件,使用JMeter Plugins Manager可以安装该工具

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-12-28
      • 1970-01-01
      • 2017-01-04
      • 1970-01-01
      • 2021-02-19
      • 1970-01-01
      • 1970-01-01
      • 2016-08-20
      相关资源
      最近更新 更多