testplan="${basedir}/web1.jmx"
resultlog="${out}/web1.jtl">
< jvmarg value="-Dgroup1.threads=10"/>
< /jmeter>
< echo message="jmeter web1.jmx finished"/>
< antcall target="interval"/>
< antcall target="test2"/>
< !--ant antfile="build.xml"/-->
< /target>
< !--for execute target test many times,copy the target test
to target test2-->
< target name="test2">
< taskdef
name="jmeter"
classname="org.programmerpl.net.ant.taskdefs.jmeter.JMeterTask"/>
< jmeter
jmeterhome="D:\ProgramFiles\jakarta-jmeter-2.1.1"
testplan="${basedir}/web1.jmx"
resultlog="${out}/web1.jtl">
< jvmarg value="-Dgroup1.threads=10"/>
< /jmeter>
< echo message="jmeter web1.jmx finished"/>
< antcall target="interval"/>
< antcall target="test"/>
< !--ant antfile="build.xml"/-->
< /target>
< target name="interval">
< echo message="sleep 5 seconds"/>
< sleep seconds="5"/>
< echo message="continue"/>
< /target>
< target name="tfile">
< xslt
in="${basedir}/web1.jtl"
out="${basedir}/web1.html"
style="${basedir}/jmeter-results-detail-report.xsl"/>
< /target>
< target name="run" depends="test"/>
< /project>
文章来源于领测软件测试网 https://www.ltesting.net/