jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "C.Vijayakumar" <bcvijayaku...@altechindia.com>
Subject RE: User Parameter
Date Thu, 11 Jun 2009 09:40:05 GMT
Hi Sebb / All , 

Thank you all for your wonderful co-operations . I have configured the CSV
Data set Config and this is my Test Plan Structure . 

-Test Plan
-- Thread Group
---CSV Data Set Config
---HTTP Request Default
---Debug Sampler
---View Results Tree
----HTTP Requests
----HTTP Requests
----HTTP Requests

I have stored the txt file with the contents ( Values of username and
passwords ) in UTF-8 format. 

And the Plan is working fine , BUT while seeing the login.do pages the
values are shown as below 


username=1297684&password=1297684
username=1197580&password=1197580
username=1297688&password=1297688

I really wondered , why for the first username only have the junk values and
also in tomcat log file the user ids are not displaying where as it is
display properly in View results Tree . 

Please explain where I need to change . Thanks in Advance. 

Thanking you .
With warm regards.,
Vijayakumar.C






-----Original Message-----
From: Deepak Shetty [mailto:shettyd@gmail.com] 
Sent: Wednesday, June 10, 2009 9:38 PM
To: JMeter Users List
Subject: Re: User Parameter

Hi
Its pretty straight forward to use..
For your example , say you have login.csv with list of username,password
Variable Names --> username,password You can then use ${username} and
${password} in your tests Delimiter --> , Allow quoted data --> If your
usernames or passwords can contain commas then you have to quote the values
e.g. login.csv should have testuser,"test,password". If thats the case
specify Allow quoted data = true, else you can keep this as false.
Recycle on EOF --> What should JMeter do when it reaches the end of the
file. If recycle is true then it will start again from the first line. If
false , the value of ${username} will remain as <EOF> (configurable). In
your test if you just want to check user login for as many rows as you have
in your csv file, you can have this as false. if you wanted to test say 100
logins but only had say 2 user name /passwords you would keep this as true
so that it would continue the test.
Stop thread on EOF --> If the end of file is reached , should the thread in
jmeter stop?. If true then your test stops, if false then it continues.
Again depends on your test.
Sharing mode --> If you have multiple threads then how is the data shared.
Typically you want this as all threads (or current thread group) so that
each thread will read a different row.

My typical structure is
Thread Group
   While Controller (${__javaScript("${MY_VARIABLE}"!="<EOF>")})
      Tests (i have to have a if here to check for <EOF> as well)
      CSV Data Set Config
         Recycle - false
         Stop Thread  - false
         Sharing mode - all threads

regards
deepak


On Wed, Jun 10, 2009 at 5:45 AM, C.Vijayakumar <
bcvijayakumar@altechindia.com> wrote:

> Hi ,
>
> Thanks for the reply , but very sorry to ask this question . I have 
> gone through the ' CSV Data Set Config ' . But can any one please 
> explain the process in detailed .
>
> Its quite confusing on using this 'CSV Data set config' . Pls Help
>
> Thanks in Advance .
> Vijayakumar.C
>
> -----Original Message-----
> From: sebb [mailto:sebbaz@gmail.com]
> Sent: Wednesday, June 10, 2009 5:10 PM
> To: JMeter Users List
> Subject: Re: User Parameter
>
> On 10/06/2009, C.Vijayakumar <bcvijayakumar@altechindia.com> wrote:
> > Hi All ,
> >
> >  I have used the following steps to Parameterize my Test Plan after 
> > getting  the information from JMeter-Nabble .
> >
> >  For passing values like user name and password using ' User parameter '
> >  file.
> >
> >  This is the solution for u r problem:
> >  1. go to options->function  Helper Dialog  2. Choose a 
> > function----CSV Read  3. Then create one csv file(Ex: login.csv) in 
> > JMETER bin folder.That file  contains first column as username and 
> > second column password.
> >  4. In function parameters,function name is csv file name and column 
> > number  is 0;  5. Then click on Generate button.then it will 
> > generate one
> >  function(${__CSVRead(login.csv,0)}) copy this function.
> >  6. Then add user parameter (Add->preprocessor->user parameter) to 
> > the thread
> >
> >  group.
> >  7. click on add variable.In parameters list enter name
> > filed(Ex:Username)  and corresponding User_1 paste the
> > function(${__CSVRead(login.csv,0)})
> >  8. and add one more variable name as password and function name as 
> > (${__CSVRead(login.csv,1)}.
> >  9.And add one more variable name as next and function as 
> > ${__CSVRead( login.csv,next)}  10. then use these names into the 
> > script. -Go to u r script and instead of
> >  username(ex: john) place ${Username} and  instead of
> > password(ex:@lt456) place ${password}
> >
> >  I have paste these ${username} & ${password} in Http Request 
> > parameters of  Login page . ( Send Parameter with Request pane )
> >
> >  But after executing the Test Plan am getting the following error 
> > message in  Tomcat server .
> >
> >  WARNING: Parameters: Character decoding failed. Parameter skipped.
> >  java.io.CharConversionException: isHexDigit
> >
> >  Can any one pls explain what i need to do to sort out this problem .
>
> Use the
>
>
> http://jakarta.apache.org/jmeter/usermanual/component_reference.html#V
> iew_Re
> sults_Tree
>
> Listener to show what you are sending.
>
> By the way
>
>
> http://jakarta.apache.org/jmeter/usermanual/component_reference.html#C
> SV_Dat
> a_Set_Config
>
> is easier to use than User Parameters + __CSVRead.
>
>
> >
> >  Thanking you .
> >  With warm regards.,
> >
> > Vijayakumar.C
> >
> >
>
> ---------------------------------------------------------------------
> 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
>
>


---------------------------------------------------------------------
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