Custom task to be created using taskdef. taskdef is meant to add custom tasks which in not inbuilt provided by ant. The tool has to provide class with task which can be integrated with ant.
<taskdef
name="jmeter"
classname="org.programmerplanet.ant.taskdefs.jmeter.JMeterTask"/>
Once task in name of jmeter is created which is mapped to class name "org.programmerplanet.ant.taskdefs.jmeter.JMeterTask", then jmeter can be used with ant.
To execute jmeter script "jmx" file and specify output log "jtl" file and to pass other arguments to jmeter, we can use following approach.
<jmeter
jmeterhome="c:\jakarta-jmeter-1.8.1"
testplan="${basedir}/loadtests/JMeterLoadTest.jmx"
resultlog="${basedir}/loadtests/JMeterResults.jtl">
<jvmarg value="-Xincgc"/>
<jvmarg value="-Xmx128m"/>
<jvmarg value="-Dproperty=value"/>
</jmeter>
<taskdef
name="jmeter"
classname="org.programmerplanet.ant.taskdefs.jmeter.JMeterTask"/>
Once task in name of jmeter is created which is mapped to class name "org.programmerplanet.ant.taskdefs.jmeter.JMeterTask", then jmeter can be used with ant.
To execute jmeter script "jmx" file and specify output log "jtl" file and to pass other arguments to jmeter, we can use following approach.
<jmeter
jmeterhome="c:\jakarta-jmeter-1.8.1"
testplan="${basedir}/loadtests/JMeterLoadTest.jmx"
resultlog="${basedir}/loadtests/JMeterResults.jtl">
<jvmarg value="-Xincgc"/>
<jvmarg value="-Xmx128m"/>
<jvmarg value="-Dproperty=value"/>
</jmeter>
No comments:
Post a Comment