I forgot it was csv, not line seperated, even still the principle is the same. Just parse the file into an array with a BeanShell script

______________________________
*Joshua E. Auerbach** **|* *Software Developer
**
V* *802.658.0965** |* *F* *802.658.0926
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>** **| www.dealer.com <http://www.dealer.com>*


Joshua E. Auerbach wrote:

My suggestions is to create a BeanShell script file that creates an array of strings from the contents of the file (each entry in the array corresponds to 1 line of the file), and then make a function that returns a random entry of the array. It should be pretty easy to do.

-Josh

______________________________
*Joshua E. Auerbach** **|* *Software Developer
**
V* *802.658.0965** |* *F* *802.658.0926
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>** **| www.dealer.com <http://www.dealer.com>*


m mat wrote:

Hi Sebb/All

As you can see I am trying to have all my threads assume different values and also have a good distribution across the sample set, for each run, or else initial values tend to get used most.

From your reply, seems there is no straightforward way to achieve this. Is this correct?


Matt
sebb <[EMAIL PROTECTED]> wrote:
Why not randomise the file contents?

This is what we do for our testing.
We use StringFromFile, but the principle is the same.

S.
On 27/09/05, m mat wrote:
Hi,

I want my threads to read random rows from a cSV file. Any way to do this? If I put
a line like the following for a value from the CSV file,
${__CSVRead(${perftest_home}\data\topics.csv,0)} ${__CSVRead(${perftest_home}\data\topics.csv,next)}

I see that all threads read the next row, for example thread 1 gets row 1 thread 2 gets row 2 etc. Also I am not sure what the next iteration of each thread will get.

What I would like is each iteration in each thread gets a completely random row?

Any thoughts?

Matt

m mat

wrote:
Hi

I am a beginner with JMeter.

How do I read random rows from a CSV file for the purpose of random parametrization?

Matt



__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com


---------------------------------
Yahoo! for Good
Click here to donate to the Hurricane Katrina relief effort.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------
Yahoo! for Good
Click here to donate to the Hurricane Katrina relief effort.

Reply via email to