jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrey Beznogov" <andb...@googlemail.com>
Subject Re: looping through CSV data file
Date Sun, 03 Aug 2008 06:26:09 GMT
Hi,

you should probably use Once Only Contoller in this case.

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

Try putting your CVS Data Set Config inside and see if it will only
read and set the varibales onece per thread. If it does not work, you
will have to read the data manually using __CSVRead function

http://jakarta.apache.org/jmeter/usermanual/functions.html#__CSVRead

Regards,
Andrey

On Fri, Aug 1, 2008 at 7:34 PM, Wei Z <wei.zhao@perceptive.com> wrote:
>
> Thanks Adrian, this would help, but potentially could be tedious because the
> number of users could be as many as 500 – this means I need to create 500
> files and each of them only has one line. Would have expected JM can handle
> this.
>
>
> Fitzpatrick, Adrian wrote:
>>
>>
>> Hi,
>>
>> You could create a seperate data file for each line, named of the form
>> JMeterDataFile1.csv, JMeterDataFile2.csv, JMeterDataFile3.csv, and so
>> on....
>>
>> Thenn, in your CVS Data Set Config, specify the file name as
>> "JMeterDataFile${__threadNum()}.csv". Therefore thread #1 will used
>> JMeterDataFile1.csv, thread #2 will use JMeterDataFile2.csv, etc.....
>>
>> Hope that helps....
>>
>> Regards,
>>
>> Adrian
>>
>> -----Original Message-----
>> From: Wei Z [mailto:wei.zhao@perceptive.com]
>> Sent: 01 August 2008 12:27
>> To: jmeter-user@jakarta.apache.org
>> Subject: looping through CSV data file
>>
>>
>> *************************************
>>
>> This e-mail has been received by the Revenue Internet e-mail service. (IP)
>>
>> *************************************
>>
>>
>> Hi,
>>
>> I have a particular issue I wonder if anyone can help to solve or to
>> suggest
>> an alternative.
>>
>> I'm using JM v2.3.2. I use a CVS Data Set Config at the thread group level
>> to control what each thread(user) should do. This includes username, pw,
>> which record on a page to edit etc.The data sharing mode is 'current
>> thread
>> group'. Recycle on EOF is 'True'.
>>
>> There are n (e.g. 10) threads in the group and there are equivalent number
>> of records(lines) in the CVS files. The loop count  is 100.
>>
>> What I want is that for each iteration, the same thread uses the same data
>> record in the CVS file. e.g. for the first iteration, thread (user) 1 will
>> grab record 1, thread 2 will grab record 2, and so on so forth. When the
>> subsequent interations start, I want thread 1 to use the same data record
>> (record 1) in CVS file. However, this is not guaranteed. Because I don't
>> have control of which thread to finish the iteration first, so if thread 2
>> finishes the iteration ahead of thread 1, then thread 2 will grab data
>> record 1. Due to the processing rule of the APP, this will causes the test
>> to fail (can't have data record 1 being used at the same time).
>>
>> Can anyone help please? Thanks in advance.
>>
>> Wei
>> --
>> View this message in context:
>> http://www.nabble.com/looping-through-CSV-data-file-tp18772458p18772458.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
>>
>>
>>
>> ************************
>>
>> This message has been delivered to the Internet by the Revenue Internet
>> e-mail service (OP)
>>
>> *************************
>>
>> ---------------------------------------------------------------------
>> 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/looping-through-CSV-data-file-tp18772458p18777157.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
>
>



-- 
diem perdidi

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