Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Ant_JMeter_xml
<project default="all" basedir="../">
<!--
Define an environment variable pointing to JMETER folder or change this
-->
<property environment="env"/>
<property name="jmeter-tools" location="${basedir}/tools/jmeter"/>
<property name="jmeter-home" location="xxx/Downloads/apache-jmeter-2.8"/>
<!--
ant-jmeter.jar comes with jmeter, be sure this is the release you have
-->
<path id="ant.jmeter.classpath">
<pathelement location="${jmeter-tools}/extra/ant-jmeter-1.1.1.jar"/>
</path>
<taskdef name="jmeter" classname="org.programmerplanet.ant.taskdefs.jmeter.JMeterTask" classpathref="ant.jmeter.classpath"/>
<target name="clean">
<delete dir="results"/>
<delete file="jmeter.log"/>
<mkdir dir="report/jmeter/results/jtl"/>
<mkdir dir="report/jmeter/results/html"/>
</target>
<target name="test" depends="clean">
<jmeter jmeterhome="${jmeter-home}" resultlogdir="report/jmeter/results/jtl">
<testplans dir="${jmeter-tools}" includes="*.jmx"/>
</jmeter>
</target>
<!--
This is not needed for the plugin, but it produces a nice html report
which can be saved usin hudson's archive artifact feature
-->
<target name="report" depends="test">
<xslt basedir="report/jmeter/results/jtl" destdir="report/jmeter/results/html" includes="*.jtl" style="${jmeter-tools}/extra/jmeter-results-detail-report_21.xsl"/>
</target>
<target name="all" depends="test, report"/>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.