You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by "BAZLEY, Sebastian" <Se...@london.sema.slb.com> on 2004/03/03 11:29:57 UTC

RE: jmeter ant - varrying threads/loop

1) Try running it directly, without using the Ant Task. 
2) What does jmeter.log contain?

I've never used the Ant Task; it's possible that it does not support the -D
and -J flags.

But I do know that properties can be used for passing in loop and thread
counts when running JMeter from the command line. 

Properties can be added to jmeter.properties (not ideal, but it would allow
you to test the Ant task).

S.
>-----Original Message-----
>From: Mark Lybarger [mailto:marklybarger@wideopenwest.com]
>Sent: 03 March 2004 02:54
>To: JMeter Users List
>Subject: jmeter ant - varrying threads/loop
>
>
>ok, i checked the FAQ, and found information on this.  When i 
>specify my 
>loops
>and threads as:
>
><property xml:space="preserve"
>propType="org.apache.jmeter.testelement.property.StringProperty"
>name="LoopController.loops">${__P(group1.loop,1)}</property>
>
><property xml:space="preserve"
>propType="org.apache.jmeter.testelement.property.StringProperty"
>name="ThreadGroup.num_threads">${__P(group1.threads,1)}</property>
>
>and i run the ant task, i get a JMeterResults.jtl file that is 
>not well 
>formed
>xml. the file contains only:
>
><?xml version="1.0" encoding="UTF-8"?>
><testResults>
>
>if i change the data in the element above to 1, then i get back valid 
>results.
>any suggestions here?   from the FAQ, jmeter should use the 
>default value
>even if i don't specify one via ant.  i did have troubles using the 
>recommended
>
>-Jgroup1.threads=12
>
>through an ant jvmargs sub element to the jmeter task.  and it doesn't 
>support
>nested args elements.
>
>ideas? suggestions?
>
>---------- Forwarded Message -----------
>From: marklybarger@wowway.com
>To: jmeter-user@jakarta.apache.org
>Sent: Tue, 2 Mar 2004 09:17:30 -0600
>Subject: jmeter ant - varrying threads/loop
>
>i'm using jmeter 1.9.1, with the included ant integration.  
>i'd like to be
>able to vary the # of threads and # of loops via the ant 
>script.  the older
>documentation for the ant task seemed to allow something like:
><jmeter jmeterhome="/cbc/jakarta-jmeter-1.9.1"
>resultlog="./loadtests/JMeterResults.jtl">
>     <testplans dir="./loadtests" includes="*.jmx" />
>     <property name="request.threads" value="${test.threads}"/>
>     <property name="request.loop" value="${test.loop}"/>
>   </jmeter>
>
>to give the threads/loops properties.  yes, my test plan has 
>specified loop
>properties, but i'd like to override those.  the 1.9.1 version of the 
>ant task
>doesn't allow nested properties.  does anyone know a good way 
>to vary the
>threads/loops via ant?  i'd like to archive the results off such as:
>
><move file="${basedir}/loadtests/JMeterResults.html"
>tofile="${basedir}/loadtests/JMeterResults-${test.threads}-${te
>st.loop}-${timestamp}.html"/> 
>
>
>so i know by looking at the file itself what the test 
>variances were during
>the execution.
>
>thanks!
>~mark
>------- End of Forwarded Message -------
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>


___________________________________________________________________________

This e-mail and the documents attached are confidential and intended solely
for the addressee; it may also be privileged. If you receive this e-mail in
error, please notify the sender immediately and destroy it. As its integrity
cannot be secured on the Internet, the Atos Origin group liability cannot be
triggered for the message content. Although the sender endeavours to maintain
a computer virus-free network, the sender does not warrant that this
transmission is virus-free and will not be liable for any damages resulting
from any virus transmitted. 
___________________________________________________________________________


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: jmeter ant - varrying threads/loop

Posted by Gary Rogers <ga...@uni.edu>.
I had the same issue. Ultimately what I did was write an Ant replace 
task (several actually) that changes tokens made in a master jmx file like:

<replace file="${scriptDir}/${testName}-remote.jmx" 
token="@UNI_USERS@"    value="${users}" />

Where @UNI_USERS@ is a token I put in the original jmx file (I coppied 
it to ${var}/-remote.jmx before the replace) and ${users} is an input 
derived property.

I had to do this because I'm running with remote servers and the 
property function doesn't pass these values to the remote machines, but 
it should work for any number of parameters if you set up the original 
with tokens to be replaced.

BAZLEY, Sebastian wrote:

>1) Try running it directly, without using the Ant Task. 
>2) What does jmeter.log contain?
>
>I've never used the Ant Task; it's possible that it does not support the -D
>and -J flags.
>
>But I do know that properties can be used for passing in loop and thread
>counts when running JMeter from the command line. 
>
>Properties can be added to jmeter.properties (not ideal, but it would allow
>you to test the Ant task).
>
>S.
>  
>
>>-----Original Message-----
>>From: Mark Lybarger [mailto:marklybarger@wideopenwest.com]
>>Sent: 03 March 2004 02:54
>>To: JMeter Users List
>>Subject: jmeter ant - varrying threads/loop
>>
>>
>>ok, i checked the FAQ, and found information on this.  When i 
>>specify my 
>>loops
>>and threads as:
>>
>><property xml:space="preserve"
>>propType="org.apache.jmeter.testelement.property.StringProperty"
>>name="LoopController.loops">${__P(group1.loop,1)}</property>
>>
>><property xml:space="preserve"
>>propType="org.apache.jmeter.testelement.property.StringProperty"
>>name="ThreadGroup.num_threads">${__P(group1.threads,1)}</property>
>>
>>and i run the ant task, i get a JMeterResults.jtl file that is 
>>not well 
>>formed
>>xml. the file contains only:
>>
>><?xml version="1.0" encoding="UTF-8"?>
>><testResults>
>>
>>if i change the data in the element above to 1, then i get back valid 
>>results.
>>any suggestions here?   from the FAQ, jmeter should use the 
>>default value
>>even if i don't specify one via ant.  i did have troubles using the 
>>recommended
>>
>>-Jgroup1.threads=12
>>
>>through an ant jvmargs sub element to the jmeter task.  and it doesn't 
>>support
>>nested args elements.
>>
>>ideas? suggestions?
>>
>>---------- Forwarded Message -----------
>>From: marklybarger@wowway.com
>>To: jmeter-user@jakarta.apache.org
>>Sent: Tue, 2 Mar 2004 09:17:30 -0600
>>Subject: jmeter ant - varrying threads/loop
>>
>>i'm using jmeter 1.9.1, with the included ant integration.  
>>i'd like to be
>>able to vary the # of threads and # of loops via the ant 
>>script.  the older
>>documentation for the ant task seemed to allow something like:
>><jmeter jmeterhome="/cbc/jakarta-jmeter-1.9.1"
>>resultlog="./loadtests/JMeterResults.jtl">
>>    <testplans dir="./loadtests" includes="*.jmx" />
>>    <property name="request.threads" value="${test.threads}"/>
>>    <property name="request.loop" value="${test.loop}"/>
>>  </jmeter>
>>
>>to give the threads/loops properties.  yes, my test plan has 
>>specified loop
>>properties, but i'd like to override those.  the 1.9.1 version of the 
>>ant task
>>doesn't allow nested properties.  does anyone know a good way 
>>to vary the
>>threads/loops via ant?  i'd like to archive the results off such as:
>>
>><move file="${basedir}/loadtests/JMeterResults.html"
>>tofile="${basedir}/loadtests/JMeterResults-${test.threads}-${te
>>st.loop}-${timestamp}.html"/> 
>>
>>
>>so i know by looking at the file itself what the test 
>>variances were during
>>the execution.
>>
>>thanks!
>>~mark
>>------- End of Forwarded Message -------
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>>
>>    
>>
>
>
>___________________________________________________________________________
>
>This e-mail and the documents attached are confidential and intended solely
>for the addressee; it may also be privileged. If you receive this e-mail in
>error, please notify the sender immediately and destroy it. As its integrity
>cannot be secured on the Internet, the Atos Origin group liability cannot be
>triggered for the message content. Although the sender endeavours to maintain
>a computer virus-free network, the sender does not warrant that this
>transmission is virus-free and will not be liable for any damages resulting
>from any virus transmitted. 
>___________________________________________________________________________
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>
>  
>


-- 
Gary Rogers
Assistant Applications Administrator
University of Northern Iowa
(319) 273-3162
"What is it is just turtles all the way down?"


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: jmeter ant - varrying threads/loop

Posted by Joseph Fifield <jf...@programmerplanet.org>.
> I've never used the Ant Task; it's possible that it does not support
the -D
> and -J flags.

It does, using the <jvmarg> and <property> subelements. But...I don't
believe the version with support for those elements is included with the
JMeter distribution yet. You may need to just get the latest from
http://www.programmerplanet.org/ant-jmeter/ for now.

If there is a problem with these subelements, let me know.

> 1) Try running it directly, without using the Ant Task.

Absolutely. The ant task does nothing more than execute the command line
anyway. To see the details of the command line the task is executing, run
ant with the -v option.

Joe

----- Original Message ----- 
From: "BAZLEY, Sebastian" <Se...@london.sema.slb.com>
To: "'JMeter Users List'" <jm...@jakarta.apache.org>
Sent: Wednesday, March 03, 2004 5:29 AM
Subject: RE: jmeter ant - varrying threads/loop


> 1) Try running it directly, without using the Ant Task.
> 2) What does jmeter.log contain?
>
> I've never used the Ant Task; it's possible that it does not support
the -D
> and -J flags.
>
> But I do know that properties can be used for passing in loop and thread
> counts when running JMeter from the command line.
>
> Properties can be added to jmeter.properties (not ideal, but it would
allow
> you to test the Ant task).
>
> S.
> >-----Original Message-----
> >From: Mark Lybarger [mailto:marklybarger@wideopenwest.com]
> >Sent: 03 March 2004 02:54
> >To: JMeter Users List
> >Subject: jmeter ant - varrying threads/loop
> >
> >
> >ok, i checked the FAQ, and found information on this.  When i
> >specify my
> >loops
> >and threads as:
> >
> ><property xml:space="preserve"
> >propType="org.apache.jmeter.testelement.property.StringProperty"
> >name="LoopController.loops">${__P(group1.loop,1)}</property>
> >
> ><property xml:space="preserve"
> >propType="org.apache.jmeter.testelement.property.StringProperty"
> >name="ThreadGroup.num_threads">${__P(group1.threads,1)}</property>
> >
> >and i run the ant task, i get a JMeterResults.jtl file that is
> >not well
> >formed
> >xml. the file contains only:
> >
> ><?xml version="1.0" encoding="UTF-8"?>
> ><testResults>
> >
> >if i change the data in the element above to 1, then i get back valid
> >results.
> >any suggestions here?   from the FAQ, jmeter should use the
> >default value
> >even if i don't specify one via ant.  i did have troubles using the
> >recommended
> >
> >-Jgroup1.threads=12
> >
> >through an ant jvmargs sub element to the jmeter task.  and it doesn't
> >support
> >nested args elements.
> >
> >ideas? suggestions?
> >
> >---------- Forwarded Message -----------
> >From: marklybarger@wowway.com
> >To: jmeter-user@jakarta.apache.org
> >Sent: Tue, 2 Mar 2004 09:17:30 -0600
> >Subject: jmeter ant - varrying threads/loop
> >
> >i'm using jmeter 1.9.1, with the included ant integration.
> >i'd like to be
> >able to vary the # of threads and # of loops via the ant
> >script.  the older
> >documentation for the ant task seemed to allow something like:
> ><jmeter jmeterhome="/cbc/jakarta-jmeter-1.9.1"
> >resultlog="./loadtests/JMeterResults.jtl">
> >     <testplans dir="./loadtests" includes="*.jmx" />
> >     <property name="request.threads" value="${test.threads}"/>
> >     <property name="request.loop" value="${test.loop}"/>
> >   </jmeter>
> >
> >to give the threads/loops properties.  yes, my test plan has
> >specified loop
> >properties, but i'd like to override those.  the 1.9.1 version of the
> >ant task
> >doesn't allow nested properties.  does anyone know a good way
> >to vary the
> >threads/loops via ant?  i'd like to archive the results off such as:
> >
> ><move file="${basedir}/loadtests/JMeterResults.html"
> >tofile="${basedir}/loadtests/JMeterResults-${test.threads}-${te
> >st.loop}-${timestamp}.html"/>
> >
> >
> >so i know by looking at the file itself what the test
> >variances were during
> >the execution.
> >
> >thanks!
> >~mark
> >------- End of Forwarded Message -------
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> >
>
>
>
___________________________________________________________________________
>
> This e-mail and the documents attached are confidential and intended
solely
> for the addressee; it may also be privileged. If you receive this e-mail
in
> error, please notify the sender immediately and destroy it. As its
integrity
> cannot be secured on the Internet, the Atos Origin group liability cannot
be
> triggered for the message content. Although the sender endeavours to
maintain
> a computer virus-free network, the sender does not warrant that this
> transmission is virus-free and will not be liable for any damages
resulting
> from any virus transmitted.
>
___________________________________________________________________________
>
>
> ---------------------------------------------------------------------
> 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