hudson

{hudson-plugin-info:pluginId=jmeter}

This plugin allows you to capture report from JMeter. Hudson will generate graphic charts with the trend report of performance and robustness.

Release 0.3 includes the feature of setting the final build status as good, unstable or failed, based on the reported jmeter error percentage.

Usage with Freestyle project

1. You can use ant and jmeter task for ant to launch tests on your web application
2. Your ant file may be similar to something like that:
 
 

<project>
...
    	<property name="jmeter" location="${env.JMETER_DIR}" />
...
    	<taskdef
		name="jmeter"
		classname="org.programmerplanet.ant.taskdefs.jmeter.JMeterTask"
		classpathref="ant.classpath"   />

	<target name="jmeter.init">
		<echo message="jmeter init..." />
		<mkdir  dir="${basedir}/loadtests/results/"/>
		<delete includeemptydirs="true">
			<fileset dir="${basedir}/loadtests/results/" includes="**/*" />
		</delete>
	</target>

	<target name="jmeter.tests" depends="jmeter.init" description="launch jmeter load tests">
		<echo message="Starting jmeter tests..." />
		<jmeter
			jmeterhome="${jmeter}"
			resultlog="${basedir}/loadtests/results/LoadTestResults.jtl">
			<testplans dir="${basedir}/loadtests" includes="*.jmx"/>
		</jmeter>
	</target>
...
</project>

Hudson Configuration

In Hudson, configure the files or the repository containing the files to be parsed by JMeter plugin.

If you have are using version 0.3, you can configure the error percentage thresholds which would make the project unstable or failed.

Other Articles

Compiling

To use the latest plugin release, you need to download, compile and install by hand. To do it, you need subversion, maven and java installed in your computer.

$ svn checkout https://svn.dev.java.net/svn/hudson/trunk/hudson/plugins/jmeter jmeter (username is 'guest' and password 'guest'
$ cd jmeter
$ mvn package
$ cp target/jmeter.hpi <path_to_hudson>/data/plugins

Changelog

 v0.3

NOTE: There is an incompatibility with the previous version of the plugin, due to the way the JMeter result files are handled:

- The Maven JMeter plugin handles the test result in this way now:
  * A test myJmeterTest.jmx produces a result file myJmeterTest-yyMMdd.xml where the date is the execution date of the test.

- The last released version (0.2) of the Hudson JMeter plugin only handles one JMeter test:
  * When the build finishes the JMeter result file myJmeterTest-yyMMdd.xml is copied to the root of the build directory and renamed to "jmeter.xml".

- But version 0.3 introduces the possibility to handle several JMeter tests :
  * When the build finishes the JMeter result files myJmeterTest-yyMMdd.xml and myOtherJmeterTest-yyMMdd.xml are copied to the build/jmeter-reports directory and renamed to "myJmeterTest.xml" and "myOtherJmeterTest.xml"
  * The result file name is used to keep track of each test when building the trend graphs, we cannot use anymore the hardcoded file name "jmeter.xml"
  * Unless the unique JMeter test file is called jmeter.jmx, there is no way to make the 2 versions of the plugin compatible.

- To keep the current test results obtained with the 0.2 plugin one has to apply the following migration procedure :
  * Rename the result file jmeter.xml found at the build root to "nameOfTheJmeterTest.xml"
  * Move the result file "nameOfTheJmeterTest.xml" to the build/jmeter-reports directory
  * The procedure has to be performed for all the existing builds

 v0.2

handling jmeter log format v 2.0

v0.1

first release