I am creating result.csv to save variable data (dynamic, set runtime). Each jmeter slave is creating its own copy of file and i need to manually parse each slave to aggregate the data. Is there any way the result can be checked on jmeter master directly?
2 Answers
Yes, there is. You just need to add the name of the variables you want to save to jmeter configuration. Referring to rel. 2.13 (things are slightly different in previous version), you just need to modify "user.properties" in $JMmeterHome/bin, by adding:
#---------------------------------------------------------------------------
# Customized property (as of 2.13)
#---------------------------------------------------------------------------
....
sample_variables=yourVariable1,yourVariable2
Instead of manually storing the variables into results.csv file let JMeter do it automatically by appending the data to its own .jtl results file. To do this add the following line to user.properties file (located under /bin folder of your JMeter installation)
sample_variables=foo,bar,etc
where foo, bar, etc. are your dynamic JMeter Variables. See Sample Variables chapter of JMeter User Manual for more detailed explanation.
you should see the following line in jmeter.log file
2016/01/10 14:09:22 INFO - jmeter.samplers.SampleEvent: List of sample_variables: [foo, bar]
which means that instruction to save "foo" and "bar" variables is propagated to slave machines and ${foo}
and ${bar}
variable values will be appended to the .jtl results file. You can use __machineName() or __machineIP functions as a prefix to Thread Group and/or Samplers names to distinguish variable values for different slave machines.
You can control what to store / not to store in .jtl results file by amending properties which names start with jmeter.save.saveservice.
in jmeter.properties file.
See Apache JMeter Properties Customization Guide for more information on JMeter Properties and ways of working with them.