My Jmeter test scripts is very simple like below
Thread Group
- User Defined Variable
: log_prefix="test"
- HttpRequest
: host=www.abc.com, path=/
- SummaryReport
: filename = ${log_prefix}_my.log
Local test is everything OK, but remote test is a little weird.
I expected to get "test_my.log" file but SummaryReport create "${log_prefix}_my.log" file in the 'bin' directory.
I think User Defined Variable doesn't affects to Listener(Summary Report) when doing remote test. what is the problem??
Don't use listeners for anything but tests development and/or debugging. You can get all the necessary information from
.jtl
results file after your test is finished, there is no need for having listeners enabled during the test run.If for some reason you cannot live without this setting you can use __P() function as a workaround.
Define
log_prefix
in user.properties file (located in the "bin" folder of your JMeter installation) like:Alternative way of setting it is passing the
log_prefix
property value via-G
command-line argument like:Change your listener to use the property instead of the variable like:
That's it, JMeter should replace the function definition with the
log_prefix
property value.References: