How to Print variable in aggregate report jmeter?

3.8k views Asked by At

I want to pass variable to aggregate report to distinguish request .How to print/pass a variable in aggregate report jmeter?

1

There are 1 answers

0
Dmitri T On BEST ANSWER

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

Variable in Sampler Name

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.