首页 文章

有没有办法可以获得Gatling“报告ID”?

提问于
浏览
2

当Gatling创建测试报告时,它将报告目录命名为 {{simulationId}}-{{someLongNumberId}} (示例 - single_user_test-1507218111111

有没有办法可以在负载测试完成后得到这个数字(在'后'钩子里?)

我想这样做的原因是创建路径以获取测试报告文件夹中的 js/stats.json 文件并获取 minResponseTime, maxResponseTime, meanResponseTime 对象 .

我是scala / gatling的新手,欢迎使用有用的链接!

1 回答

  • 1

    你谈的数字是:

    scala> System.currentTimeMillis
    res1: Long = 1508321556008
    

    标准输出中打印的最后一句是:

    Reports generated in 0s.
    Please open the following file: /Users/nicolas/Downloads/gatling-charts-highcharts-bundle-2.3.0/results/basicsimulation-1508321476222/index.html
    

    你不能解析那个吗?

相关问题