需要有关上述错误的帮助。
当我尝试将参数从 jenkins 传递给 ant 时,出现以下错误:
"No public execute() in class org.programmerplanet.ant.taskdefs.jmeter.Arg"
由于我是 jenkins ant 集成的新手,所以我不太了解。
任何建议都会有很大帮助。
我的蚂蚁脚本是:
<project basedir=".">
<property environment="env"/>
<property name="jmeter-home" location="D:/apache-jmeter-2.7"/>
<property name="THREADS" value="${env.THREADS}"/>
<path id="ant.jmeter.classpath">
<pathelement location="${jmeter-home}/extras/ant-jmeter-1.0.9.jar" />
</path>
<taskdef
name="jmeter"
classname="org.programmerplanet.ant.taskdefs.jmeter.JMeterTask"
classpathref="ant.jmeter.classpath" />
<taskdef
name="jvmarg"
classname="org.programmerplanet.ant.taskdefs.jmeter.Arg"
classpathref="ant.jmeter.classpath"/>
<target name="clean">
<delete dir="results"/>
<delete file="jmeter.log"/>
<mkdir dir="results/jtl"/>
<mkdir dir="results/html"/>
</target>
<target name="Product" depends="clean" >
<jmeter jmeterhome="d:/apache-jmeter-2.7"
resultlogdir="results/jtl"
testplan="D:\Program Files\....\Test.jmx" />
<jvmarg value ="-DTHREADS"/>
<xslt
in="${basedir}/results/jtl/Test.jtl"
out="${basedir}/results/html/Test.xml"
style="${jmeter-home}/extras/jmeter-results-report_21.xsl"/>
</target>