jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: CSV files and ForEach Controller
Date Fri, 02 Dec 2005 00:33:00 GMT
On 01/12/05, StokesP@quinn-direct.com <StokesP@quinn-direct.com> wrote:
>
> Hey Sebb,
>
> Thanks for your comments.
>
> For example, I have a script that performs a quote of a system (e.g. car
> quote) using a predefined customer reference (person). I need to perform
> this quote for x number of predefined customer reference numbers, i.e.
> first quote performed will use ABC/DEF/12345 as the reference number. The
> second quote does the same thing just needs to use a different customer
> ref, ABC/DEF/12346.
>
> I will need to perform 10,000 quotes, so therefore need to be able to read
> in from a file all my pre-defined customer reference numbers so I can
> perform the same quote on each one.
>
> I.e. I need a file with :
>
> ABC/DEF/12345
> ABC/DEF/12346
> ABC/DEF/12347
>
> Then in my working jmeter script that currently does 1 quote on a hardcoded
> reference number as part of the HTTP Request Sampler, I want to loop round
> the whole quote process and perform it once for each customer reference
> contained in that file.
>
> Thiis will then ideally have the load spread over say 100 jmeter threads so
> that if I have 10,000 quotes required, that means I give 10,000 customer
> refs, and say if I use 100 threads then each thread will perform 100 quotes
> with unique customer refs.
>
> Going on from what you have said, I am now starting to look at the CSVRead
> function because that's what referred me to the CSV Data Set Config, but
> I'm still lost on how to get jmeter to loop round an array of customer refs
> obtained from a file.

Try the following:

Thread Group
+ CSV Data Set: cust_ref
+ Sampler using ${cust_ref} instead of the hard-coded reference
+ optional Timer or Throughput Controller
+ Listener (Tree or Table)

The CSV Data Set element will read the next line from the file at the
start of each loop; different threads will automatically get different
lines from the file.

I think 100 threads will be a big load on your server and network; I
would try 20 or perhaps 50, and adjust the loop count accordingly.
Ramp-up should be 1-2 seconds per thread.

If you want to try this without connecting to the server, use the Java
Sampler (Java Test) and put the ${cust_ref} in one of its fields so
you can see it in the Listener.

S.

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