You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by ashish261080 <as...@yahoo.com> on 2008/09/03 09:15:03 UTC

Stress testing with JMeter - HTTP User Parameter Modifier

Hi,

I want to simulate 1,000 requests on my web application each request passing
different paramaters to the login.jsp file ie. 1000 different usernames and
passwords to the login page. For that I defined set of users in an XML file
named users.xml and saved it under the bin directory of JMeter's
distribution with the name users.xml overwriting the existing sample file


<?xml version="1.0"?>
<!DOCTYPE allthreads SYSTEM "users.dtd">

   <allthreads>

	<thread>
		<parameter>
                    <paramname>username</paramname>
                    <paramvalue>linuxuser</paramvalue>
                </parameter>
		<parameter>
                    <paramname>password</paramname>
                    <paramvalue>techie</paramvalue>
                </parameter>
	</thread>

	<thread>
		<parameter>
                    <paramname>username</paramname>
                    <paramvalue>windowsuser</paramvalue>
                </parameter>
		<parameter>
                    <paramname>password</paramname>
                    <paramvalue>non-techie</paramvalue>
                </parameter>
	</thread>
   </allthreads>

I then changed the following input fields in order to simulate each
individual user with the stress test:

    * Number of threads: From the Thread Group option, changed this number
to 3 to reflect those declared in the users.xml file.
    * Pre-processors: While placed on the HTTP Request icon, right-clicked
and selected the Add -- Pre Processors -- User Parameter choice from the
pull-down menu. I read that this option tells JMeter to load the users.xml
file.

But despite doing that I don't see the users.xml contents being reflected in
the User "Parameter" Preprocessor screen as given in the screenshot.

JMeter manual says there is a preprocessor "HTTP User Parameter Modifier"
but I can find only "User Parameter" Preprocessor. Please tell me where am I
going wrong. Am i using the wrong version. I am currently using
jakarta-jmeter-2.3.2 version.


http://www.nabble.com/file/p19284107/Userparameter.jpeg 
-- 
View this message in context: http://www.nabble.com/Stress-testing-with-JMeter---HTTP-User-Parameter-Modifier-tp19284107p19284107.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: Stress testing with JMeter - HTTP User Parameter Modifier

Posted by sebb <se...@gmail.com>.
On 03/09/2008, ashish261080 <as...@yahoo.com> wrote:
>
> Hi,
>
> I want to simulate 1,000 requests on my web application each request passing
> different paramaters to the login.jsp file ie. 1000 different usernames and
> passwords to the login page. For that I defined set of users in an XML file
> named users.xml and saved it under the bin directory of JMeter's
> distribution with the name users.xml overwriting the existing sample file
>

The users.xml file is deprecated; it is much better to use a different
method such as CSV Dataset.

>
> <?xml version="1.0"?>
> <!DOCTYPE allthreads SYSTEM "users.dtd">
>
>   <allthreads>
>
>        <thread>
>                <parameter>
>                    <paramname>username</paramname>
>                    <paramvalue>linuxuser</paramvalue>
>                </parameter>
>                <parameter>
>                    <paramname>password</paramname>
>                    <paramvalue>techie</paramvalue>
>                </parameter>
>        </thread>
>
>        <thread>
>                <parameter>
>                    <paramname>username</paramname>
>                    <paramvalue>windowsuser</paramvalue>
>                </parameter>
>                <parameter>
>                    <paramname>password</paramname>
>                    <paramvalue>non-techie</paramvalue>
>                </parameter>
>        </thread>
>   </allthreads>
>
> I then changed the following input fields in order to simulate each
> individual user with the stress test:
>
>    * Number of threads: From the Thread Group option, changed this number
> to 3 to reflect those declared in the users.xml file.
>    * Pre-processors: While placed on the HTTP Request icon, right-clicked
> and selected the Add -- Pre Processors -- User Parameter choice from the
> pull-down menu. I read that this option tells JMeter to load the users.xml
> file.
>
> But despite doing that I don't see the users.xml contents being reflected in
> the User "Parameter" Preprocessor screen as given in the screenshot.
>
> JMeter manual says there is a preprocessor "HTTP User Parameter Modifier"
> but I can find only "User Parameter" Preprocessor. Please tell me where am I
> going wrong. Am i using the wrong version. I am currently using
> jakarta-jmeter-2.3.2 version.

http://jakarta.apache.org/jmeter/usermanual/component_reference.html#HTTP_User_Parameter_Modifier
says that the element is deprecated; one should use

http://jakarta.apache.org/jmeter/usermanual/component_reference.html#User_Parameters

instead

See also the CSV Data Set Config element, which is more suitable for
large numbers of parameters:

http://jakarta.apache.org/jmeter/usermanual/component_reference.html#CSV_Data_Set_Config

>
> http://www.nabble.com/file/p19284107/Userparameter.jpeg
> --
> View this message in context: http://www.nabble.com/Stress-testing-with-JMeter---HTTP-User-Parameter-Modifier-tp19284107p19284107.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
>
>

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


Re: Stress testing with JMeter - HTTP User Parameter Modifier

Posted by ashish261080 <as...@yahoo.com>.
Thanks so much....there was indeed problem in sharing mode of thread.

Problem resolved :)


sebb-2-2 wrote:
> 
> On 04/09/2008, ashish261080 <as...@yahoo.com> wrote:
>>
>>  Thanks Ajay...That did help but for each thread that is run it is
>> picking
>>  only the first line of the CSV file. I want that for each new request,
>> new
>>  values from CSV should be picked.
>>
>>
>>  My csvdata.txt under the bin folder has the following contents-
>>
>>
>> username1,password1
>>  username2,password2
>>  username3,password3
>>
>>  But For each request usernam1 and password1 are being passed as
>> parameters
>>
> 
> When in doubt, please check the manual:
> 
> http://jakarta.apache.org/jmeter/usermanual/component_reference.html#CSV_Data_Set_Config
> 
> Try changing the sharing mode to all threads (which is the default):
> 
>>  Thanks....
>>
>>
>>
>>
>>
>>
>>  Mishra, Ajay wrote:
>>  >
>>  > Hi,
>>  >
>>  > I think you missed out to define the "Value" field in the HTTP Request
>>  > page.
>>  > If you have defined the text files with user name and password then in
>>  > the value field you have to mention "${username}" and "${password}".
>>  >
>>  > Ajay
>>  >
>>  > -----Original Message-----
>>  > From: ashish261080 [mailto:ash.abrol@yahoo.com]
>>  > Sent: Thursday, September 04, 2008 4:25 PM
>>  > To: jmeter-user@jakarta.apache.org
>>  > Subject: Re: Stress testing with JMeter - HTTP User Parameter Modifier
>>  >
>>  >
>>  > I tried with the CSV also but of no use.
>>  >
>>  > I am attaching the screenshots if you could help me figure out the
>>  > reason.
>>  >
>>  > http://www.nabble.com/file/p19307965/CSV%2BData%2Bset%2Bconfig.jpeg
>>  > http://www.nabble.com/file/p19307965/ThreadGroup.jpeg
>>  > http://www.nabble.com/file/p19307965/results.jpeg
>>  >
>>  >
>>  > Also my csvdata.txt under the bin folder has the following contents-
>>  > username,password
>>  > username1,password1
>>  > username2,password2
>>  >
>>  > If you see the Results tree screenshot you would find that the request
>>  > parameters being passed to the login servlet are empty in the query
>>  > string.
>>  > I would appreciate if you could let me know where am I going wrong. I
>>  > have
>>  > researched a lot on the net but all in futile.
>>  >
>>  > Thanks in advance,
>>  > Ashish Abrol
>>  >
>>  > --
>>  > View this message in context:
>>  >
>> http://www.nabble.com/Stress-testing-with-JMeter---HTTP-User-Parameter-M
>>  > odifier-tp19284107p19307965.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
>>  >
>>  > ---------------------------------------------------------------------
>>  > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>>  > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>>  >
>>  >
>>  >
>>
>>  --
>>
>> View this message in context:
>> http://www.nabble.com/Stress-testing-with-JMeter---HTTP-User-Parameter-Modifier-tp19284107p19308788.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
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Stress-testing-with-JMeter---HTTP-User-Parameter-Modifier-tp19284107p19314779.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: Stress testing with JMeter - HTTP User Parameter Modifier

Posted by sebb <se...@gmail.com>.
On 04/09/2008, ashish261080 <as...@yahoo.com> wrote:
>
>  Thanks Ajay...That did help but for each thread that is run it is picking
>  only the first line of the CSV file. I want that for each new request, new
>  values from CSV should be picked.
>
>
>  My csvdata.txt under the bin folder has the following contents-
>
>
> username1,password1
>  username2,password2
>  username3,password3
>
>  But For each request usernam1 and password1 are being passed as parameters
>

When in doubt, please check the manual:

http://jakarta.apache.org/jmeter/usermanual/component_reference.html#CSV_Data_Set_Config

Try changing the sharing mode to all threads (which is the default):

>  Thanks....
>
>
>
>
>
>
>  Mishra, Ajay wrote:
>  >
>  > Hi,
>  >
>  > I think you missed out to define the "Value" field in the HTTP Request
>  > page.
>  > If you have defined the text files with user name and password then in
>  > the value field you have to mention "${username}" and "${password}".
>  >
>  > Ajay
>  >
>  > -----Original Message-----
>  > From: ashish261080 [mailto:ash.abrol@yahoo.com]
>  > Sent: Thursday, September 04, 2008 4:25 PM
>  > To: jmeter-user@jakarta.apache.org
>  > Subject: Re: Stress testing with JMeter - HTTP User Parameter Modifier
>  >
>  >
>  > I tried with the CSV also but of no use.
>  >
>  > I am attaching the screenshots if you could help me figure out the
>  > reason.
>  >
>  > http://www.nabble.com/file/p19307965/CSV%2BData%2Bset%2Bconfig.jpeg
>  > http://www.nabble.com/file/p19307965/ThreadGroup.jpeg
>  > http://www.nabble.com/file/p19307965/results.jpeg
>  >
>  >
>  > Also my csvdata.txt under the bin folder has the following contents-
>  > username,password
>  > username1,password1
>  > username2,password2
>  >
>  > If you see the Results tree screenshot you would find that the request
>  > parameters being passed to the login servlet are empty in the query
>  > string.
>  > I would appreciate if you could let me know where am I going wrong. I
>  > have
>  > researched a lot on the net but all in futile.
>  >
>  > Thanks in advance,
>  > Ashish Abrol
>  >
>  > --
>  > View this message in context:
>  > http://www.nabble.com/Stress-testing-with-JMeter---HTTP-User-Parameter-M
>  > odifier-tp19284107p19307965.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
>  >
>  > ---------------------------------------------------------------------
>  > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>  > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>  >
>  >
>  >
>
>  --
>
> View this message in context: http://www.nabble.com/Stress-testing-with-JMeter---HTTP-User-Parameter-Modifier-tp19284107p19308788.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
>
>

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


RE: Stress testing with JMeter - HTTP User Parameter Modifier

Posted by ashish261080 <as...@yahoo.com>.
Thanks Ajay...That did help but for each thread that is run it is picking
only the first line of the CSV file. I want that for each new request, new
values from CSV should be picked.

My csvdata.txt under the bin folder has the following contents-

username1,password1
username2,password2
username3,password3 

But For each request usernam1 and password1 are being passed as parameters

Thanks....





Mishra, Ajay wrote:
> 
> Hi,
> 
> I think you missed out to define the "Value" field in the HTTP Request
> page.
> If you have defined the text files with user name and password then in
> the value field you have to mention "${username}" and "${password}".
> 
> Ajay
> 
> -----Original Message-----
> From: ashish261080 [mailto:ash.abrol@yahoo.com] 
> Sent: Thursday, September 04, 2008 4:25 PM
> To: jmeter-user@jakarta.apache.org
> Subject: Re: Stress testing with JMeter - HTTP User Parameter Modifier
> 
> 
> I tried with the CSV also but of no use. 
> 
> I am attaching the screenshots if you could help me figure out the
> reason.
> 
> http://www.nabble.com/file/p19307965/CSV%2BData%2Bset%2Bconfig.jpeg 
> http://www.nabble.com/file/p19307965/ThreadGroup.jpeg 
> http://www.nabble.com/file/p19307965/results.jpeg 
> 
> 
> Also my csvdata.txt under the bin folder has the following contents-
> username,password
> username1,password1
> username2,password2
> 
> If you see the Results tree screenshot you would find that the request
> parameters being passed to the login servlet are empty in the query
> string.
> I would appreciate if you could let me know where am I going wrong. I
> have
> researched a lot on the net but all in futile.
> 
> Thanks in advance,
> Ashish Abrol
> 
> -- 
> View this message in context:
> http://www.nabble.com/Stress-testing-with-JMeter---HTTP-User-Parameter-M
> odifier-tp19284107p19307965.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
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Stress-testing-with-JMeter---HTTP-User-Parameter-Modifier-tp19284107p19308788.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: Stress testing with JMeter - HTTP User Parameter Modifier

Posted by "Mishra, Ajay" <Aj...@gs.com>.
Hi,

I think you missed out to define the "Value" field in the HTTP Request
page.
If you have defined the text files with user name and password then in
the value field you have to mention "${username}" and "${password}".

Ajay

-----Original Message-----
From: ashish261080 [mailto:ash.abrol@yahoo.com] 
Sent: Thursday, September 04, 2008 4:25 PM
To: jmeter-user@jakarta.apache.org
Subject: Re: Stress testing with JMeter - HTTP User Parameter Modifier


I tried with the CSV also but of no use. 

I am attaching the screenshots if you could help me figure out the
reason.

http://www.nabble.com/file/p19307965/CSV%2BData%2Bset%2Bconfig.jpeg 
http://www.nabble.com/file/p19307965/ThreadGroup.jpeg 
http://www.nabble.com/file/p19307965/results.jpeg 


Also my csvdata.txt under the bin folder has the following contents-
username,password
username1,password1
username2,password2

If you see the Results tree screenshot you would find that the request
parameters being passed to the login servlet are empty in the query
string.
I would appreciate if you could let me know where am I going wrong. I
have
researched a lot on the net but all in futile.

Thanks in advance,
Ashish Abrol

-- 
View this message in context:
http://www.nabble.com/Stress-testing-with-JMeter---HTTP-User-Parameter-M
odifier-tp19284107p19307965.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

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


Re: Stress testing with JMeter - HTTP User Parameter Modifier

Posted by ashish261080 <as...@yahoo.com>.
I tried with the CSV also but of no use. 

I am attaching the screenshots if you could help me figure out the reason.

http://www.nabble.com/file/p19307965/CSV%2BData%2Bset%2Bconfig.jpeg 
http://www.nabble.com/file/p19307965/ThreadGroup.jpeg 
http://www.nabble.com/file/p19307965/results.jpeg 


Also my csvdata.txt under the bin folder has the following contents-
username,password
username1,password1
username2,password2

If you see the Results tree screenshot you would find that the request
parameters being passed to the login servlet are empty in the query string.
I would appreciate if you could let me know where am I going wrong. I have
researched a lot on the net but all in futile.

Thanks in advance,
Ashish Abrol

-- 
View this message in context: http://www.nabble.com/Stress-testing-with-JMeter---HTTP-User-Parameter-Modifier-tp19284107p19307965.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