Add unique runid to .jtl file for every Jmeter run.

huangapple go评论64阅读模式
英文:

Add unique runid to .jtl file for every Jmeter run

问题

在.Jtl结果中,我可以看到一个列被添加,列名为build_number的值,而列值为空。

英文:

I am running below jmeter command using power shell

$runid =$build_number
jmeter -Jsample_variables=$runid -n -t test.jmx -l result.jtl

In the .Jtl result , I could see column added with build_number value as column name and column values are empty.

答案1

得分: 1

以下是翻译好的部分:

你声明了示例变量,但没有为其分配任何值。

  1. 在你的测试计划中添加用户定义的变量配置元素,并在那里使用${__P(runid,)}函数定义runid变量的值:

    Add unique runid to .jtl file for every Jmeter run.

  2. 修改你的JMeter启动命令为:

    jmeter -Jsample_variables=runid -Jrunid=123456 -n -t test.jmx -l result.jtl
    
  3. 就这样,一旦测试完成,你应该能够看到带有适当值的runid列:

    Add unique runid to .jtl file for every Jmeter run.

英文:

You declare the Sample Variable but not assigning any value to it

  1. Add User Defined Variables configuration element to your test plan and define runid variable there using ${__P(runid,)} function as the value:

    Add unique runid to .jtl file for every Jmeter run.

  2. Amend your JMeter startup command as:

    jmeter -Jsample_variables=runid -Jrunid=123456 -n -t test.jmx -l result.jtl
    
  3. That's it, once test finishes you should be able to see the runid column with the appropriate value:

    Add unique runid to .jtl file for every Jmeter run.

huangapple
  • 本文由 发表于 2020年1月6日 16:53:55
  • 转载请务必保留本文链接:https://go.coder-hub.com/59609127.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定