e综合可以使用此方法来达要求当你想停止测试时则手动停止即可查看上面的这个build
<! Simple Ant Jmeter test>
<project name=antjmeter default=run basedir=>
<property name=out value=/>
<target name=test>
<taskdef
name=jmeter
classname=orgprogrammerplanetanttaskdefsjmeterJMeterTask/>
<jmeter
jmeterhome=D:\ProgramFiles\jakartajmeter
testplan=${basedir}/webjmx
resultlog=${out}/webjtl>
<jvmarg value=Dgroupthreads=/>
</jmeter>
<echo message=jmeter webjmx finished/>
<antcall target=interval/>
<antcall target=test/>
<!ant antfile=buildxml/>
</target>
<!for execute target test many timescopy the target test
to target test>
<target name=test>
<taskdef
name=jmeter
classname=orgprogrammerplanetanttaskdefsjmeterJMeterTask/>
<jmeter
jmeterhome=D:\ProgramFiles\jakartajmeter
testplan=${basedir}/webjmx
resultlog=${out}/webjtl>
<jvmarg value=Dgroupthreads=/>
</jmeter>
<echo message=jmeter webjmx finished/>
<antcall target=interval/>
<antcall target=test/>
<!ant antfile=buildxml/>
</target>
<target name=interval>
<echo message=sleep seconds/>
<sleep seconds=/>
<echo message=continue/>
</target>
<target name=tfile>
<xslt
in=${basedir}/webjtl
out=${basedir}/webhtml
style=${basedir}/jmeterresultsdetailreportxsl/>
</target>
<target name=run depends=test/>
</project>
[] [] [] []