Reputation: 311
For each sampler result I have a variable value which I want to show it in the summary report as a test result. How to write this value in the jtl file and show it in the summary report?
Upvotes: 0
Views: 2281
Reputation: 168002
You can write the variable into a file using sample_variables
property.
Add the next line to user.properties file:
sample_variables=foo
replace foo
with your actual variable name
foo
variable value for each SampleResult With regards to displaying it in the summary report, this is not something you can do out of the box, however you can plot the variable value as a chart in the HTML Reporting Dashboard. If this is something you're interested in - add the next lines to user.properties file:
jmeter.reportgenerator.graph.custom_testGraph.classname=org.apache.jmeter.report.processor.graph.impl.CustomGraphConsumer
jmeter.reportgenerator.graph.custom_testGraph.title=Foo values
jmeter.reportgenerator.graph.custom_testGraph.property.set_Y_Axis=Foo values
jmeter.reportgenerator.graph.custom_testGraph.set_X_Axis=Over Time
jmeter.reportgenerator.graph.custom_testGraph.property.set_granularity=60000
jmeter.reportgenerator.graph.custom_testGraph.property.set_Sample_Variable_Name=foo
jmeter.reportgenerator.graph.custom_testGraph.property.set_Content_Message=Foo value :
again, replace foo
with your actual JMeter Variable name
References:
Upvotes: 4