Reporting JMeter performance metrics
In this recipe, you be shown how to configure Jenkins to run a JMeter test plan, and then collect and report the results. The passing of variables from an Ant script to JMeter will also be explained.
Getting ready
It is assumed that you have run through the last recipe creating the JMeter test plan. You also need to install the Jenkins performance plugin (https://wiki.jenkins-ci.org/display/JENKINS/Performance+Plugin).
How to do it...
- Open
./examples/jmeter_example.jmx
in JMeter and save as./plans/URL_ping.jmx
. - Select
CSV Data Set Config
changing the filename to${__property(csv)}
. - Under the
File
menu, select theSave
option.
- Create a
build.xml
file at the top level of your project with the following content:
<project default="jmeter.tests"> <property name="jmeter" location="/var/lib/jenkins/jmeter" /> <property name="target" location="${basedir}/target" /> <echo message="Running... Expecting variables [jvarg,desc]" /> <...