Md Sohail Mansuri
Md Sohail Mansuri

Reputation: 7

How to get jmeter results in graph using jfreechart and ant

I have one JMeter script. I want to run it in ant script(as ant provide result in html page). I also want graph result in that or new Html page. I heard i can do with jfreechart but i don't know how to do it.

Please help me!!!

Upvotes: 0

Views: 1593

Answers (3)

Dmitri T
Dmitri T

Reputation: 168147

I'd suggest to pick one of the following options:

  1. Each "Graph" listener has `Write results to file/Read from file" section. You can execute JMeter via Ant task with i.e. Graph Results listener enabled saving output to some file, after that open .jtl or .csv file in Listener and you'll get your graph which you can save to image format and add it to HTML report.However using Graph listeners it isn't very recommended from performance perspective.
  2. If you want some HTML charts it's better idea to consider Google Charts instead of JFreeChart, however some basic XSLT/Javascript knowledge will be required to build graph from XML data.
  3. The fastest and easiest way is using Blazemeter Plugin to JMeter, it's free, can be executed via command line, Ant task, GUI, whatever - it's just another listener which provides professional-looking reports and also has feature of comparing test runs.

Upvotes: 2

GrahamA
GrahamA

Reputation: 5923

Rather than trying to do this yourself, have you considered using the Performance Plugin for Jenkins? It may alreay have the charts you need.

enter image description here

If you still need to develop your own charts, you will need to write a plug-in for JMeter; charts are on page 8.

Upvotes: 1

Related Questions