You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Nithya Prakash <ni...@gmail.com> on 2010/08/19 12:35:01 UTC

How to Run Jmeter in command line

Hi

Till now I was running the test scripts in GUI mode which I found it
comfortable. Now my task is to run my scripts in non-gui mode. I require
your help in executing it. I have created a test script in GUI mode and
saved it as "cmdtc.jmx". Now my objective is to run this testcase in command
line. I have gone thru' few materials reg this but am not able to understand
properly. Kindly help me out.

Steps I followed:
1. Opened the cmd.
2. Entered the syntax as shown
" C:\Documents and
Settings\tt\Desktop\jakarta-jmeter-2.3.4\jakarta-jmeter-2.3.4\bin\jmeter

Re: How to Run Jmeter in command line

Posted by Dzmitry_Kashlach <dz...@gmail.com>.
  I have written an post devoted to 
http://blazemeter.com/blog/dear-abby-blazemeter-how-do-i-run-jmeter-non-gui-mode
running JMeter without GUI . Hope, it will be helpful



--
View this message in context: http://jmeter.512774.n5.nabble.com/How-to-Run-Jmeter-in-command-line-tp2640725p5714598.html
Sent from the JMeter - User mailing list archive at Nabble.com.

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


Re: How to Run Jmeter in command line

Posted by Felix Frank <ff...@mpexnet.de>.
Here's what I do. For the variable value, I use ${__P(my_param_name)}.
Then I invoke Jmeter as
$ jmeter -n -t plan.jmx -Jmy_param_name=10
or whatever value I want.
Careful: When running with servers (jmeter -R) use -G instead of -J !

Cheers,
Felix

On 08/20/10 13:57, Karsten Gaul wrote:
> Hi Nythia,
> 
> I haven't heard of a possibility to change test plan variables from the
> command line yet. To work around this you could write a csv file which
> is editable via the nano or pico editors. You may have to install cygwin
> if you're not on a linux machine. Having done that, you could even edit
> the jmx in the command prompt for it is a 'simple' xml file. I wouldn't
> suggest that, though, and you will agree once you've tried.
> 
> rgds
> Karsten
> 
> Am 19.08.2010 14:47, schrieb Nithya Prakash:
>> Hi Karsten,
>>
>> Thanks man.. Its working now. I have another query... Is it possible to
>> change the input value's from command prompt ??
>>
>> Eg: I have a variable in UDV named "uname" and its value is " JUser ".
>> Now I
>> need to change the user name to "CMDUser" from the command prompt itself.
>>
>> I have seen the various command line options, but unable to
>> understand. can
>> u pls guide me??

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


Re: How to Run Jmeter in command line

Posted by Karsten Gaul <ka...@exedio.com>.
Hi Nythia,

I haven't heard of a possibility to change test plan variables from the 
command line yet. To work around this you could write a csv file which 
is editable via the nano or pico editors. You may have to install cygwin 
if you're not on a linux machine. Having done that, you could even edit 
the jmx in the command prompt for it is a 'simple' xml file. I wouldn't 
suggest that, though, and you will agree once you've tried.

rgds
Karsten

Am 19.08.2010 14:47, schrieb Nithya Prakash:
> Hi Karsten,
>
> Thanks man.. Its working now. I have another query... Is it possible to
> change the input value's from command prompt ??
>
> Eg: I have a variable in UDV named "uname" and its value is " JUser ". Now I
> need to change the user name to "CMDUser" from the command prompt itself.
>
> I have seen the various command line options, but unable to understand. can
> u pls guide me??
>
> Regards
> Nithya.
>
> On Thu, Aug 19, 2010 at 4:19 PM, Karsten Gaul<ka...@exedio.com>wrote:
>
>> Hi Nithya
>>
>> Once you're in your bin folder, type the following:
>>
>> java -jar ApacheJMeter.jar -n -t<testfile>
>>
>> rgds
>> Karsten
>>
>> Am 19.08.2010 12:38, schrieb Nithya Prakash:
>>
>>   Hi
>>>
>>> Till now I was running the test scripts in GUI mode which I found it
>>> comfortable. Now my task is to run my scripts in non-gui mode. I require
>>> your help in executing it. I have created a test script in GUI mode and
>>> saved it as "cmdtc.jmx". Now my objective is to run this testcase in
>>> command
>>> line. I have gone thru' few materials reg this but am not able to
>>> understand
>>> properly. Kindly help me out.
>>>
>>> Steps I followed:
>>> 1. Opened the cmd.
>>> 2. Entered the syntax as shown
>>> " C:\Documents and
>>> Settings\tt\Desktop\jakarta-jmeter-2.3.4\jakarta-jmeter-2.3.4\bin\jmeter
>>> -n
>>> -t C:\Documents and Settings\nithya.prakash\Desktop\cmdtc.jmx "
>>>
>>> When I execute this I am getting
>>> " An error occurred: Unkown arg: and
>>> errorlevel=1  "
>>>
>>> Am unable to understand where i'm goin wrong.... can anybody help me out
>>> please ??
>>>
>>>
>>> Regards
>>> Nithya
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>>


-- 
Karsten Gaul
Dipl. Medieninf.
Softwareentwickler

Telefon +49 (351) 4108-135
Fax +49 (351) 4108-5135
karsten.gaul@exedio.com
www.exedio.com

exedio GmbH
Buchenstr. 16 B
01097 Dresden
Deutschland

Handelsregister: HRB 22109
Amtsgericht Dresden
Sitz der Gesellschaft: Dresden
Geschäftsführer: Sven-Erik Bornscheuer, Lutz Kirchner, Falk Krause

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


Re: How to Run Jmeter in command line

Posted by gurjant singh <gu...@gmail.com>.
Hi Nithya,

Execute the this command prompt
jmeterBinDirectoryPath/jmeter -n -t <testfile>

-Bunty

On Thu, Aug 19, 2010 at 4:19 PM, Karsten Gaul <ka...@exedio.com>wrote:

> Hi Nithya
>
> Once you're in your bin folder, type the following:
>
> java -jar ApacheJMeter.jar -n -t <testfile>
>
> rgds
> Karsten
>
> Am 19.08.2010 12:38, schrieb Nithya Prakash:
>
>  Hi
>>
>> Till now I was running the test scripts in GUI mode which I found it
>> comfortable. Now my task is to run my scripts in non-gui mode. I require
>> your help in executing it. I have created a test script in GUI mode and
>> saved it as "cmdtc.jmx". Now my objective is to run this testcase in
>> command
>> line. I have gone thru' few materials reg this but am not able to
>> understand
>> properly. Kindly help me out.
>>
>> Steps I followed:
>> 1. Opened the cmd.
>> 2. Entered the syntax as shown
>> " C:\Documents and
>> Settings\tt\Desktop\jakarta-jmeter-2.3.4\jakarta-jmeter-2.3.4\bin\jmeter
>> -n
>> -t C:\Documents and Settings\nithya.prakash\Desktop\cmdtc.jmx "
>>
>> When I execute this I am getting
>> " An error occurred: Unkown arg: and
>> errorlevel=1  "
>>
>> Am unable to understand where i'm goin wrong.... can anybody help me out
>> please ??
>>
>>
>> Regards
>> Nithya
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

Re: How to Run Jmeter in command line

Posted by sebb <se...@gmail.com>.
On 21 August 2010 13:58, Nithya Prakash <ni...@gmail.com> wrote:
> hey ppl,
>
> Thank you for your support. i tried using ${__P(my_para_name)} and its
> absolutely working fine. I have another query....

Please start a new thread for a new query.

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


Re: How to Run Jmeter in command line

Posted by Nithya Prakash <ni...@gmail.com>.
hey ppl,

Thank you for your support. i tried using ${__P(my_para_name)} and its
absolutely working fine. I have another query....
the scenario is like i want to test the performance now. So i am creating 50
users under single organization and i want to use these 50 users to create a
project simultaneously and want to check the performance. My query is " How
to execute this scenario" ???


Regards
Nithya

On Fri, Aug 20, 2010 at 9:17 PM, Deepak Shetty <sh...@gmail.com> wrote:

> Im assuming you want to change this while the test is running?
> a. http://jakarta.apache.org/jmeter/usermanual/best-practices.html -
> BeanShell Server
> b. Modify your test itself so that it knows that the value needs to be
> changed and picks up a new value(What is the condition under which you want
> to make this change)?
>
> regards
> deepak
>
> On Thu, Aug 19, 2010 at 5:47 AM, Nithya Prakash
> <ni...@gmail.com>wrote:
>
> > Hi Karsten,
> >
> > Thanks man.. Its working now. I have another query... Is it possible to
> > change the input value's from command prompt ??
> >
> > Eg: I have a variable in UDV named "uname" and its value is " JUser ".
> Now
> > I
> > need to change the user name to "CMDUser" from the command prompt itself.
> >
> > I have seen the various command line options, but unable to understand.
> can
> > u pls guide me??
> >
> > Regards
> > Nithya.
> >
> > On Thu, Aug 19, 2010 at 4:19 PM, Karsten Gaul <karsten.gaul@exedio.com
> > >wrote:
> >
> > > Hi Nithya
> > >
> > > Once you're in your bin folder, type the following:
> > >
> > > java -jar ApacheJMeter.jar -n -t <testfile>
> > >
> > > rgds
> > > Karsten
> > >
> > > Am 19.08.2010 12:38, schrieb Nithya Prakash:
> > >
> > >  Hi
> > >>
> > >> Till now I was running the test scripts in GUI mode which I found it
> > >> comfortable. Now my task is to run my scripts in non-gui mode. I
> require
> > >> your help in executing it. I have created a test script in GUI mode
> and
> > >> saved it as "cmdtc.jmx". Now my objective is to run this testcase in
> > >> command
> > >> line. I have gone thru' few materials reg this but am not able to
> > >> understand
> > >> properly. Kindly help me out.
> > >>
> > >> Steps I followed:
> > >> 1. Opened the cmd.
> > >> 2. Entered the syntax as shown
> > >> " C:\Documents and
> > >>
> Settings\tt\Desktop\jakarta-jmeter-2.3.4\jakarta-jmeter-2.3.4\bin\jmeter
> > >> -n
> > >> -t C:\Documents and Settings\nithya.prakash\Desktop\cmdtc.jmx "
> > >>
> > >> When I execute this I am getting
> > >> " An error occurred: Unkown arg: and
> > >> errorlevel=1  "
> > >>
> > >> Am unable to understand where i'm goin wrong.... can anybody help me
> out
> > >> please ??
> > >>
> > >>
> > >> Regards
> > >> Nithya
> > >>
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> > >
> >
>

Re: How to Run Jmeter in command line

Posted by Deepak Shetty <sh...@gmail.com>.
Im assuming you want to change this while the test is running?
a. http://jakarta.apache.org/jmeter/usermanual/best-practices.html -
BeanShell Server
b. Modify your test itself so that it knows that the value needs to be
changed and picks up a new value(What is the condition under which you want
to make this change)?

regards
deepak

On Thu, Aug 19, 2010 at 5:47 AM, Nithya Prakash
<ni...@gmail.com>wrote:

> Hi Karsten,
>
> Thanks man.. Its working now. I have another query... Is it possible to
> change the input value's from command prompt ??
>
> Eg: I have a variable in UDV named "uname" and its value is " JUser ". Now
> I
> need to change the user name to "CMDUser" from the command prompt itself.
>
> I have seen the various command line options, but unable to understand. can
> u pls guide me??
>
> Regards
> Nithya.
>
> On Thu, Aug 19, 2010 at 4:19 PM, Karsten Gaul <karsten.gaul@exedio.com
> >wrote:
>
> > Hi Nithya
> >
> > Once you're in your bin folder, type the following:
> >
> > java -jar ApacheJMeter.jar -n -t <testfile>
> >
> > rgds
> > Karsten
> >
> > Am 19.08.2010 12:38, schrieb Nithya Prakash:
> >
> >  Hi
> >>
> >> Till now I was running the test scripts in GUI mode which I found it
> >> comfortable. Now my task is to run my scripts in non-gui mode. I require
> >> your help in executing it. I have created a test script in GUI mode and
> >> saved it as "cmdtc.jmx". Now my objective is to run this testcase in
> >> command
> >> line. I have gone thru' few materials reg this but am not able to
> >> understand
> >> properly. Kindly help me out.
> >>
> >> Steps I followed:
> >> 1. Opened the cmd.
> >> 2. Entered the syntax as shown
> >> " C:\Documents and
> >> Settings\tt\Desktop\jakarta-jmeter-2.3.4\jakarta-jmeter-2.3.4\bin\jmeter
> >> -n
> >> -t C:\Documents and Settings\nithya.prakash\Desktop\cmdtc.jmx "
> >>
> >> When I execute this I am getting
> >> " An error occurred: Unkown arg: and
> >> errorlevel=1  "
> >>
> >> Am unable to understand where i'm goin wrong.... can anybody help me out
> >> please ??
> >>
> >>
> >> Regards
> >> Nithya
> >>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> >
>

Re: How to Run Jmeter in command line

Posted by Nithya Prakash <ni...@gmail.com>.
Hi Karsten,

Thanks man.. Its working now. I have another query... Is it possible to
change the input value's from command prompt ??

Eg: I have a variable in UDV named "uname" and its value is " JUser ". Now I
need to change the user name to "CMDUser" from the command prompt itself.

I have seen the various command line options, but unable to understand. can
u pls guide me??

Regards
Nithya.

On Thu, Aug 19, 2010 at 4:19 PM, Karsten Gaul <ka...@exedio.com>wrote:

> Hi Nithya
>
> Once you're in your bin folder, type the following:
>
> java -jar ApacheJMeter.jar -n -t <testfile>
>
> rgds
> Karsten
>
> Am 19.08.2010 12:38, schrieb Nithya Prakash:
>
>  Hi
>>
>> Till now I was running the test scripts in GUI mode which I found it
>> comfortable. Now my task is to run my scripts in non-gui mode. I require
>> your help in executing it. I have created a test script in GUI mode and
>> saved it as "cmdtc.jmx". Now my objective is to run this testcase in
>> command
>> line. I have gone thru' few materials reg this but am not able to
>> understand
>> properly. Kindly help me out.
>>
>> Steps I followed:
>> 1. Opened the cmd.
>> 2. Entered the syntax as shown
>> " C:\Documents and
>> Settings\tt\Desktop\jakarta-jmeter-2.3.4\jakarta-jmeter-2.3.4\bin\jmeter
>> -n
>> -t C:\Documents and Settings\nithya.prakash\Desktop\cmdtc.jmx "
>>
>> When I execute this I am getting
>> " An error occurred: Unkown arg: and
>> errorlevel=1  "
>>
>> Am unable to understand where i'm goin wrong.... can anybody help me out
>> please ??
>>
>>
>> Regards
>> Nithya
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>

Re: How to Run Jmeter in command line

Posted by Karsten Gaul <ka...@exedio.com>.
Hi Nithya

Once you're in your bin folder, type the following:

java -jar ApacheJMeter.jar -n -t <testfile>

rgds
Karsten

Am 19.08.2010 12:38, schrieb Nithya Prakash:
> Hi
>
> Till now I was running the test scripts in GUI mode which I found it
> comfortable. Now my task is to run my scripts in non-gui mode. I require
> your help in executing it. I have created a test script in GUI mode and
> saved it as "cmdtc.jmx". Now my objective is to run this testcase in command
> line. I have gone thru' few materials reg this but am not able to understand
> properly. Kindly help me out.
>
> Steps I followed:
> 1. Opened the cmd.
> 2. Entered the syntax as shown
> " C:\Documents and
> Settings\tt\Desktop\jakarta-jmeter-2.3.4\jakarta-jmeter-2.3.4\bin\jmeter -n
> -t C:\Documents and Settings\nithya.prakash\Desktop\cmdtc.jmx "
>
> When I execute this I am getting
> " An error occurred: Unkown arg: and
> errorlevel=1  "
>
> Am unable to understand where i'm goin wrong.... can anybody help me out
> please ??
>
>
> Regards
> Nithya


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


How to Run Jmeter in command line

Posted by Nithya Prakash <ni...@gmail.com>.
Hi

Till now I was running the test scripts in GUI mode which I found it
comfortable. Now my task is to run my scripts in non-gui mode. I require
your help in executing it. I have created a test script in GUI mode and
saved it as "cmdtc.jmx". Now my objective is to run this testcase in command
line. I have gone thru' few materials reg this but am not able to understand
properly. Kindly help me out.

Steps I followed:
1. Opened the cmd.
2. Entered the syntax as shown
" C:\Documents and
Settings\tt\Desktop\jakarta-jmeter-2.3.4\jakarta-jmeter-2.3.4\bin\jmeter -n
-t C:\Documents and Settings\nithya.prakash\Desktop\cmdtc.jmx "

When I execute this I am getting
" An error occurred: Unkown arg: and
errorlevel=1  "

Am unable to understand where i'm goin wrong.... can anybody help me out
please ??


Regards
Nithya