Reputation: 159
I want to pass variable to aggregate report to distinguish request .How to print/pass a variable in aggregate report jmeter?
Upvotes: 0
Views: 3881
Reputation: 168002
Option 1: you can add variable to Sampler Name so you will be able to figure out the variable value and distinguish samplers basing on their labels in the Aggregate Report as
Option 2: you can use sample_variables
JMeter property. JMeter will append variable values to sampler metrics in results .jtl file. It will not be displayed in the Aggregare Report, but it will be possible to analyze .jtl file with Excel or equivalent.
To use "sample_variables" feature add the following line to user.properties file (it is located under /bin folder of your JMeter installation)
sample_variables=VAR1,VAR2,VAR3
You can "tell" JMeter to store single or multiple variable values along with request metrics.
JMeter restart is required to pick up amended property from the "user.properties" file. Alternative way is providing property via -J command-line argument as
jmeter -Jsample_variables=foo -n -t /path/to/testplan.jmx
See Apache JMeter Properties Customization Guide for advanced information on using, setting and overriding JMeter properties.
Upvotes: 2