You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Garvita <ga...@tcs.com> on 2010/08/26 08:59:04 UTC
Jmeter ant bulid
Hi a am trying to configure jakata jmeter2.3.4 with ant build file.
My build file is :
<?xml version="1.0" encoding="UTF-8"?>
<project default="ready" basedir="." name="PI Test Webapp">
<property environment="env" />
<property file="../../build.properties" />
<property name="jmeter.home" value="/appl/enovianxp/jmeter/2.3.4"/>
<property name="mxant" value="../../Tools/mxant"/>
<import file="${mxant}/mxant-import.xml"/>
<echo>Before starting TaskDef</echo>
<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"/>
<echo>After TaskDef</echo>
<macrodef name="jmeter-test">
<attribute name="file"/>
<attribute name="name" default="@{file}"/>
<sequential>
<echo>Running jMeter test case @{file}
</echo>
<mkdir dir="${log}/webtest"/>
<pathconvert property="test.dir" dirsep="/" refid="doinit.name.path"/>
<jmeter
jmeterhome="${jmeter.home}"
testplan="@{file}"
jmeterproperties="${basedir}/../../jmeter.properties"
resultlog="${log}/webtest/@{name}_results.jtl">
</jmeter>
<if>
<equals arg1="${os}" arg2="windows" trim="true"/>
<then>
<echo>windows</echo>
<echo>basedir1 @{basedir}</echo>
<copy file="${basedir}/log/jmeter.log"
tofile="${log}/@{name}_jmeter.log" />
</then>
<else>
<echo>unix</echo>
<echo>basedir2 @{basedir}
</echo>
<copy file="${basedir}/log/jmeter.log"
tofile="${log}/@{name}_jmeter.log" />
</else>
</if>
<xslt
in="${log}/webtest/@{name}_results.jtl"
out="${log}/webtest/@{name}_details.html"
style="${mxant}/etc/jmeter-results-report.xsl">
</xslt>
<echo>Building XML Data File For Threads</echo>
<property name="DataTimeStamp" value="${started.date}_${started.time}"/>
<xslt
in="${log}/webtest/@{name}_results.jtl"
out="${log}/webtest/@{name}_combined.xml"
style="${mxant}/etc/jmeter-xml-report.xsl">
</xslt>
<echo>Building Thread Summary HTML</echo>
<xslt
in="${log}/webtest/@{name}_combined.xml"
out="${log}/webtest/@{name}_thread_summary.html"
style="${mxant}/etc/jmeter-thread-summary.xsl">
</xslt>
<echo>hi</echo>
<echo>Ready running jMeter test case @{file}</echo>
</sequential>
</macrodef>
<target name="jmeter-init" depends="init" >
<property name="doinit.name" value="init"/>
<!-- convert doinit.name to file-safe chars -->
<path id="doinit.name.path">
<pathelement location="${doinit.name}"/>
</path>
<pathconvert property="doinit.name.converted" pathsep="_" dirsep="_"
refid="doinit.name.path">
<map from="${basedir}" to=""/>
</pathconvert>
</target>
<target name= "test" depends="jmeter-init">
<echo>Starting Viewer UseCases...</echo>
<jmeter-test file="login.jmx" name="login"/>
<echo>Viewer UseCases Complete</echo>
</target>
<target name="default" depends="test">
</target>
</project>
and i am getting in logs as:
BUILD FAILED
/appl/enovianxp/home/plmdev3/automatedTest/CCOps/Application/WebApp/Test/build.xml:95:
The following error occurred while executing this line:
/appl/enovianxp/home/plmdev3/automatedTest/CCOps/Application/WebApp/Test/build.xml:36:
jmeter doesn't support the "jmeterproperties" attribute
Please help me to overcome these problem.
Thamks all in advance.
--
View this message in context: http://jmeter.512774.n5.nabble.com/Jmeter-ant-bulid-tp2682168p2682168.html
Sent from the JMeter - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: Jmeter ant bulid
Posted by kblearner <sa...@citi.com>.
Hi Garvita,
Did putting 'classpathref="ant.jmeter.classpath"' as suggested by Tao
resolve your "jmeter.properties not resolved" issue ?
--
View this message in context: http://jmeter.512774.n5.nabble.com/Jmeter-ant-bulid-tp2682168p2798068.html
Sent from the JMeter - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
RE: Jmeter ant bulid
Posted by Tao Weibang <tw...@decarta.com>.
jmeter doesn't support the "jmeterproperties" attribute?
Checjing this
<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"/>
try with
<path id="ant.jmeter.classpath">
<pathelement
location="${jmeter.home}/extras/ant-jmeter-1.0.9.jar" />
</path>
<taskdef
name="jmeter"
classpathref="ant.jmeter.classpath"
classname="org.programmerplanet.ant.taskdefs.jmeter.JMeterTask"/>
-Weber
-----Original Message-----
From: Garvita [mailto:garvita.mehta@tcs.com]
Sent: Thursday, August 26, 2010 2:59 PM
To: jmeter-user@jakarta.apache.org
Subject: Jmeter ant bulid
Hi a am trying to configure jakata jmeter2.3.4 with ant build file.
My build file is :
<?xml version="1.0" encoding="UTF-8"?>
<project default="ready" basedir="." name="PI Test Webapp">
<property environment="env" />
<property file="../../build.properties" />
<property name="jmeter.home" value="/appl/enovianxp/jmeter/2.3.4"/>
<property name="mxant" value="../../Tools/mxant"/>
<import file="${mxant}/mxant-import.xml"/>
<echo>Before starting TaskDef</echo>
<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"/>
<echo>After TaskDef</echo>
<macrodef name="jmeter-test">
<attribute name="file"/>
<attribute name="name" default="@{file}"/>
<sequential>
<echo>Running jMeter test case @{file}
</echo>
<mkdir dir="${log}/webtest"/>
<pathconvert property="test.dir" dirsep="/"
refid="doinit.name.path"/>
<jmeter
jmeterhome="${jmeter.home}"
testplan="@{file}"
jmeterproperties="${basedir}/../../jmeter.properties"
resultlog="${log}/webtest/@{name}_results.jtl">
</jmeter>
<if>
<equals arg1="${os}" arg2="windows"
trim="true"/>
<then>
<echo>windows</echo>
<echo>basedir1 @{basedir}</echo>
<copy file="${basedir}/log/jmeter.log"
tofile="${log}/@{name}_jmeter.log" />
</then>
<else>
<echo>unix</echo>
<echo>basedir2 @{basedir}
</echo>
<copy file="${basedir}/log/jmeter.log"
tofile="${log}/@{name}_jmeter.log" />
</else>
</if>
<xslt
in="${log}/webtest/@{name}_results.jtl"
out="${log}/webtest/@{name}_details.html"
style="${mxant}/etc/jmeter-results-report.xsl">
</xslt>
<echo>Building XML Data File For Threads</echo>
<property name="DataTimeStamp"
value="${started.date}_${started.time}"/>
<xslt
in="${log}/webtest/@{name}_results.jtl"
out="${log}/webtest/@{name}_combined.xml"
style="${mxant}/etc/jmeter-xml-report.xsl">
</xslt>
<echo>Building Thread Summary HTML</echo>
<xslt
in="${log}/webtest/@{name}_combined.xml"
out="${log}/webtest/@{name}_thread_summary.html"
style="${mxant}/etc/jmeter-thread-summary.xsl">
</xslt>
<echo>hi</echo>
<echo>Ready running jMeter test case @{file}</echo>
</sequential>
</macrodef>
<target name="jmeter-init" depends="init" >
<property name="doinit.name" value="init"/>
<!-- convert doinit.name to file-safe chars -->
<path id="doinit.name.path">
<pathelement location="${doinit.name}"/>
</path>
<pathconvert property="doinit.name.converted" pathsep="_"
dirsep="_"
refid="doinit.name.path">
<map from="${basedir}" to=""/>
</pathconvert>
</target>
<target name= "test" depends="jmeter-init">
<echo>Starting Viewer UseCases...</echo>
<jmeter-test file="login.jmx" name="login"/>
<echo>Viewer UseCases Complete</echo>
</target>
<target name="default" depends="test">
</target>
</project>
and i am getting in logs as:
BUILD FAILED
/appl/enovianxp/home/plmdev3/automatedTest/CCOps/Application/WebApp/Test
/build.xml:95:
The following error occurred while executing this line:
/appl/enovianxp/home/plmdev3/automatedTest/CCOps/Application/WebApp/Test
/build.xml:36:
jmeter doesn't support the "jmeterproperties" attribute
Please help me to overcome these problem.
Thamks all in advance.
--
View this message in context:
http://jmeter.512774.n5.nabble.com/Jmeter-ant-bulid-tp2682168p2682168.ht
ml
Sent from the JMeter - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org