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 <
[email protected]> 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:[email protected]]
> Sent: Wednesday, June 10, 2009 5:10 PM
> To: JMeter Users List
> Subject: Re: User Parameter
>
> On 10/06/2009, C.Vijayakumar <[email protected]> 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#View_Re
> sults_Tree
>
> Listener to show what you are sending.
>
> By the way
>
>
> http://jakarta.apache.org/jmeter/usermanual/component_reference.html#CSV_Dat
> a_Set_Config
>
> is easier to use than User Parameters + __CSVRead.
>
>
> >
> > Thanking you .
> > With warm regards.,
> >
> > Vijayakumar.C
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>