During my JMeter test I am extracting a float value from the response message an saving it to a variable using Regular Expression Extractor, and I am also saving that value in the generated test result csv file. Now I want to be able to generate a graph of this extracted float value, but haven't figured out a way to do so, or have found and examples to create my own graph plug in to graph this value.
-
open CSV in Excel and create graph is the most straight forward way. So please provide more details why that wouldn't work for you. – timbre timbre Aug 21 '18 at 19:09
2 Answers
In next version of JMeter 5.0, you’ll be able to do that bu adding in user.properties this:
sample_variables=VarName
jmeter.reportgenerator.graph.custom_mm_hit.classname=org.apache.jmeter.report.processor.graph.impl.CustomGraphConsumer
jmeter.reportgenerator.graph.custom_mm_hit.title=Graph Title
jmeter.reportgenerator.graph.custom_mm_hit.property.set_Y_Axis=Response Time (ms)
jmeter.reportgenerator.graph.custom_mm_hit.property.set_X_Axis=Over Time
jmeter.reportgenerator.graph.custom_mm_hit.property.set_granularity=${jmeter.reportgenerator.overall_granularity}
jmeter.reportgenerator.graph.custom_mm_hit.property.setSampleVariableName=VarName
jmeter.reportgenerator.graph.custom_mm_hit.property.setContentMessage=Message for graph point label
In above example:
- VarName is the name of your variable
- custom_mm_hit would be a unique id for your graph, you should change it but always prefix with "custom_"
To configure and generate graph see:
You ‘ll get a new Graph of value over time in Custom Graphs section.
To download nightly build which is stable snd will be very close to 5.0, see:

- 33,980
- 5
- 71
- 116
You can use Sample Variables property to save your float value into .jtl results file
Add the next line to user.properties file:
sample_variables=foo
Replace
foo
with your actual JMeter Variable Reference Name from the Regular Expression ExtractorWhen you run your test next time you will see an extra column in the .jtl results file holding your float variable value. Another option is setting this property via -J command-line argument like
jmeter -Jsample_variables=foo -n -t test.jmx -l result.jtl
See Configuring JMeter and Apache JMeter Properties Customization Guide articles for more information on tuning your JMeter engine using properties.
Once you get the value stored you can plot the chart using LibreOffice Calc or Microsoft Excel or equivalent.
If you want to come up with a plugin to plot the custom variable you can start with How to write a plugin for JMeter guide and then look into source of i.e. Latencies Over Time plugin which lives in GitHub

- 159,985
- 5
- 83
- 133
-
I am already storing the extracted variable, just need to graph it using JMeter – Diego Estrada Aug 22 '18 at 16:35