You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Matt <ma...@gmail.com> on 2007/02/26 12:12:53 UTC

Using data from flat files with remote servers

Hi folks,

I currently need to run two Jmeter servers against a Load Balancer to check
for sticky sessions.  I am reading values from a flat file to use for
creating new users.

I am loading this file in with the ${__StringFromFile(users.csv)} function.

I put this file in to the bin directory of two of my Jmeter linux servers.

When the test runs the threads pick up different values within the file, but
the Jmeter servers start from the same position in the file.  So i'm getting
duplicate values which causes problems in my test.

I dont' really want to create two different scripts for this.  Is there an
easy way to make the remote Jmeter servers get allocated unique data?

Thanks,

Matt

Re: Using data from flat files with remote servers

Posted by Matt <ma...@gmail.com>.
Yes.. though I need the value to be unique and not repeated.

I was hoping there was a way without having to have two different scripts,
or the same file (users.csv) with different content in for the two JMeter
servers.

I think for simplicity i'll use the same filename with two different content
in them i.e.

JMeter Server A -users.csv
username1
username2

JMeter Server B - users.csv
username3
username4

Thanks,

Matt

On 26/02/07, Stuart Findlay <st...@cp.net> wrote:
>
> Surely you can split the user populations between two different csv
> files so each JMeter instance will only access a subset of your user
> population.
>
> BTW - if your user pops have logical names such as user1 to user10000
> then you can user a random generator in a per-thread variable setting
>
> username | user${__Random(1,5000,n)} in script 1
> username | user${__Random(5001,10000,n)} in script 2
>
> the variable ${username} can then be reused throughout the script as can
> the user number ${n}
>
> Stuart
>
>
>
>
> Matt wrote:
> > Hi folks,
> >
> > I currently need to run two Jmeter servers against a Load Balancer to
> > check
> > for sticky sessions.  I am reading values from a flat file to use for
> > creating new users.
> >
> > I am loading this file in with the ${__StringFromFile(users.csv)}
> > function.
> >
> > I put this file in to the bin directory of two of my Jmeter linux
> > servers.
> >
> > When the test runs the threads pick up different values within the
> > file, but
> > the Jmeter servers start from the same position in the file.  So i'm
> > getting
> > duplicate values which causes problems in my test.
> >
> > I dont' really want to create two different scripts for this.  Is
> > there an
> > easy way to make the remote Jmeter servers get allocated unique data?
> >
> > Thanks,
> >
> > Matt
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

Re: Using data from flat files with remote servers

Posted by Stuart Findlay <st...@cp.net>.
Surely you can split the user populations between two different csv 
files so each JMeter instance will only access a subset of your user 
population.

BTW - if your user pops have logical names such as user1 to user10000 
then you can user a random generator in a per-thread variable setting

username | user${__Random(1,5000,n)} in script 1
username | user${__Random(5001,10000,n)} in script 2

the variable ${username} can then be reused throughout the script as can 
the user number ${n}

Stuart




Matt wrote:
> Hi folks,
>
> I currently need to run two Jmeter servers against a Load Balancer to 
> check
> for sticky sessions.  I am reading values from a flat file to use for
> creating new users.
>
> I am loading this file in with the ${__StringFromFile(users.csv)} 
> function.
>
> I put this file in to the bin directory of two of my Jmeter linux 
> servers.
>
> When the test runs the threads pick up different values within the 
> file, but
> the Jmeter servers start from the same position in the file.  So i'm 
> getting
> duplicate values which causes problems in my test.
>
> I dont' really want to create two different scripts for this.  Is 
> there an
> easy way to make the remote Jmeter servers get allocated unique data?
>
> Thanks,
>
> Matt
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org