Ok Akshata and Melvin,

I can help up until a point with this one because the case in which I read a CSV file is slightly different but if what I say doesn't help I can suggest a few other ways ahead or someone else can jump in and tell us how it's really done.

Here goes -
In my case I know how many lines are in the CSV file. You say you want to stop at EOF but it my case I stop once a variable counter reaches a certain number.

First thing I do is I read in the number of lines from a config file and put that into a variable.

I then use a 'Loop controller' which is kind of like a standard 'for loop'. In that loop controller I set the 'Loop Count' setting to be equal to my variable name which stores the number of lines in the file.

As a child of the loop controller I put a 'CSV Data Set Config' element. I set the filename path to the path to my CSV file; I leave file encoding blank; I make my variable names "variable1,variable2" <-- don't include the double quotes in the setting; I set the delimiter to , <--- comma; Allow quoted data would be yes in your case; Recycle on EOF would be false; Stop thread on EOF false in my case but maybe true for you if this example doesn't work and sharing mode I guess is current thread.

That will loop for the number of lines in your CSV file and each iteration your variables will have the next line of data. Put a debug sampler after the CSV data set config element too and if your variables are not set to at least something from the CSV file then your path to or permissions over the CSV file are wrong.

Now, if you really need to loop till EOF you can try the following 'untested by me' way - Same sort of setup however in the loop count setting instead of a variable check the Forever checkbox then in the CSV reader set stop thread on EOF to true. I assume that will work but I've never tried it. I also don't know if Stop thread is really what is does. I would hope if it was in a loop it would just stop iteration as opposed to the entire thread but it sounds like that's what you need anyway so you can give that a try to.

The final way I know this could be done is really quite awful and it involves reading the entire CSV file and turning them into a big set of variables by use of a regular expression. Then you use a foreach loop over that set of variables. I don't think this is the way to go however and I'd hope someone else would jump in and tell us how it's really done before anyone goes down that path.

Chad

Melvin Laguren wrote:
I'm actually having a similar problem as well.  The only difference is that my 
test is reading $(COMPANY) and not $(USER) and $(PASSWORD).


-----Original Message-----
From: akshata s.m. [mailto:[EMAIL PROTECTED]
Sent: Thu 10/16/2008 11:27 AM
To: JMeter Users List
Subject: Re: csv Data Set Config
Hi..

I would like to test this application sequentially.
I mean.. one user at a time.. This would help me to verify certain negative 
scenarios and handling them would be easier as this testplan  isnt that huge..

But what is observe is, JMeter is not reading any user from the csv file. 
Neither the results are listed in my listener.

I have the parameter names as USER,PWD (Hope its not USER,PWD, )
And the parameters in the samplers are replaced by ${USER} AND ${PWD}.

I am unable to identify the mistake here.

Regards,
Akshata

--- On Wed, 10/15/08, Anthony Chadszinow <[EMAIL PROTECTED]> wrote:
From: Anthony Chadszinow <[EMAIL PROTECTED]>
Subject: Re: csv Data Set Config
To: "JMeter Users List" <jmeter-user@jakarta.apache.org>
Date: Wednesday, October 15, 2008, 4:38 PM

Here's a link to the true rules of the CSV format http://www.creativyst.com/Doc/Articles/CSV/CSV01.htm

The format you specify sounds fine.

I think you can do the test actions you mention in two ways. First is a loop within a single test plan so one thread of jmeter does all the logging in as the X number of users in the CSV file. Then that test can run concurrently so you get lots of the same users logging in concurrently.

Another way I believe is each thread running can grab a different user from the CSV file and perform the actions you listed as that user alone.

How did you want to test this application?

Chad

akshata s.m. wrote:
Hello,

I have 5 http requests which perform Login, display homepage and logout.

For my application, i want to login as user1, execute the samplers and
logout.
And then login as user2 repeat the process and logout.

I am trying to use the CSV Data Set Config for my application to login as
different users but one after the other.
I have a csvdata.txt file at the location of my jmx file. I would like to
know the format of the csv file.
Should the username and password value pairs be in a single line? say..

user1,pwd1
user2,pwd2
.
.
.

If yes i would like to know how Jmeter picks these values. Also what
should be the values set for:
1. Allow quoted data
2. Recycle on EOF
3. Stop thread on EOF
4. Sharing mode

Kindly do the needful.

Regards,
Akshata




--
Anthony Chadszinow
MySource Classic Lead Developer

Squiz
92 Jarrett St Leichhardt, Sydney NSW, Australia 2040 t: 13000 SQUIZ ( Support )
t:    8507 9900 / 1300 130 661
f:    8507 9988
e:    [EMAIL PROTECTED]
w:    www.matrix.squiz.net
w:    www.squiz.net

Sydney | Melbourne | Canberra | Hobart | Wellington | London Open Source - Own it - Squiz.net
----------------------------------------------------

IMPORTANT:This email (and any attachments) is commercial-in-confidence and
or may be legally privileged and must not be forwarded, copied or shared
without express permission from Squiz. If you are not the intended
recipient, you may not legally copy, disclose or use the contents in any way
and you should contact [EMAIL PROTECTED] immediately and destroy this message and any
attachments. Thank you.

Reply via email to