Reputation: 1
I would like to know if in Jmeter, I have a test case that I would like to run 3 times a day, is it possible in the jtl or csv output file, if there is a way to identify the test run. For ex: if I run the test first time for 500 users, the results should specify {some value} as 1. And if I run the same test the 2nd time, then results should specify the {some value} as 2 .... .... If I run the same test 50th time, then results should specify the {some value} as 50.
Is it possible we have a solution that we can customize from jmeter properties? If so please let me know.
Thanks,
Sarathi
Upvotes: 0
Views: 598
Reputation: 1447
Alternatively, you can use the time function which will simply provide the current timestamp as a variable you can then append to wherever you want.
http://jmeter.apache.org/usermanual/functions.html#__time
Upvotes: 1
Reputation: 168082
I'd suggest to do it as follows:
Pass required property to JMeter via -J command line argument as follows:
jmeter -Jiteration=1 -n -t /path/to/test/script.jmx -l /path/to/results/log.jtl
In your test plan refer to that "iteration" property as ${__P(iteration,)}
which will take the value from command line wherever is required:
See screenshot below for the demo
JMeter properties can also be specified in jmeter.properties or user.properties files, both usually live under /bin folder of your JMeter installation.
See Apache JMeter Properties Customization Guide for more details on how to get things done using JMeter properties.
Upvotes: 0