jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: Query | How Can i pass the num_threads jmeter value through ANT task?
Date Mon, 11 Aug 2008 01:30:56 GMT
On 01/08/2008, Mohamed Niyas <niyas.mohd@gmail.com> wrote:
> Hi friends,
>
>  I am using ANT task to run the jmeter test plan without a GUI mode. Here I
>  wanted to pass the jmeter value for each test script.
>  In DOS, i was able to over ride the value of this by passing the command as
>  below.
>  **
>  *DOS MODE is Successful:*
>  **
>  In the test plan, i am using the this function in the num_thread property
>  "${__P(threads,3)}" --> Nothing but if no value is passed 3 will be taken as
>  default.
>
>  Then from Command line i am using this following command to execute the
>  test.
>  "jmeter -n -t test_plan.jmx -Jthreads=15 -l test_plan.jtl" --
>  (now it is taking the value as 15 threads, if i not mentioned this value it
>  would take 3 threads by default)
>  **
>  *--END DOS MODE--*
>  **
>  How do i pass the value of this Jmeter variables through ANT. Even in ANT i
>  used the following build settings.. but none was successful.
>  All the time the default value is only taken it executed the tests for 3
>  users only. You can visit the following link for more info:
>  http://www.programmerplanet.org/pages/projects/jmeter-ant-task.php But i
>  could not find the solution, what i want to accomplish.
>
>  *failed_settings1: Build.xml values:*
>
>  <target name="shop">
>  <jmeter    jmeterhome="C:\jakarta-jmeter-2.3RC4"
>  testplan="C:\jakarta-jmeter-2.3RC4\bin\Oct_Jmscripts\Stage\Basic_Shopping\Test_Shopping.jmx"
>  resultlog="C:\jakarta-jmeter-2.3RC4\bin\Oct_Jmscripts\Stage\Basic_Shopping\Basic
>  Shopping 15U.jtl"/>
>  <property name="request.threads" value="15"/>

This defines the property request.threads, not threads.

>  </target>
>
>   *failed_settings 2: Build.xml values:*
>
>  <target name="shop">
>  <jmeter    jmeterhome="C:\jakarta-jmeter-2.3RC4"
>  testplan="C:\jakarta-jmeter-2.3RC4\bin\Oct_Jmscripts\Stage\Basic_Shopping\Test_Shopping.jmx"
>  resultlog="C:\jakarta-jmeter-2.3RC4\bin\Oct_Jmscripts\Stage\Basic_Shopping\Basic
>  Shopping 15U.jtl"/>
>  <jmeterarg value="-Jthreads=15"/>

That should work.

>  </target>
>
>   *failed_settings 3: Build.xml values:*
>
>  <target name="shop">
>  <jmeter    jmeterhome="C:\jakarta-jmeter-2.3RC4"
>  testplan="C:\jakarta-jmeter-2.3RC4\bin\Oct_Jmscripts\Stage\Basic_Shopping\Test_Shopping.jmx"
>  resultlog="C:\jakarta-jmeter-2.3RC4\bin\Oct_Jmscripts\Stage\Basic_Shopping\Basic
>  Shopping 15U.jtl"/>
>  <jvmarg value="-Jthreads=15"/>

jvmarg is for defining Java arguments.

>  </target>
>
>
>  If anyone find the solution, please share your knowledge.
>
>
>
>  --
>  Regards,
>  Mohamed Niyas M
>  Mobile: 98804 59080
>  niyas.mohd@gmail.com
>  to_niyas@yahoo.co.in
>

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


Mime
View raw message