You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by wsmith84 <to...@gmail.com> on 2009/08/06 23:50:12 UTC

multiple users/threads using the same CSV variable value

I have a CSV file I'm reading in delay times from for start times for a soap
message sampler

basically I'm trying to first recreate actual usage of a web service by
setting
up a csv file with a variable called 'startTime' that contains the times 
when the web service was called,
and later have a flexible way to simulate more traffic -
I'd like to add more users but each user reads a new line from the 
cvs file - instead of having to create a new CSV file with more start times,
I'd like to use the same one but add some time increment
to each value.

ideally if user1 could read the variable from the line from the CSV file,
and the next user (user2) could add some time increment to the value
that user1 read and use that as its delay.

so if my CSV file of start times looks like:
1200
1500
2500

user1 would fire off the sampler at 1200, 1500, and 2500 milliseconds,
and user2 would fire off the same sampler at 1400, 1700, and 2700  (adding
200
milliseconds to the delay times of user1)

right now I have the following hierarchy:

- test plan
  - mythreadgroup
    -mySampler
       -myCSVstarttime data set config
       -Constant Timer
       -Response Assertion
       -View Results tree

mythreadgroup is set to loop forever
myCSVstarttime data set config file 
is set to recycle on EOF =false and stop thread on EOF=true
constant timer component has a delay time = ${startTime}  (which defined in
the CSV file)


any ideas how to do this?


thanks
-- 
View this message in context: http://www.nabble.com/multiple-users-threads-using-the-same-CSV-variable-value-tp24855119p24855119.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


Re: multiple users/threads using the same CSV variable value

Posted by Adrian Speteanu <as...@gmail.com>.
On Fri, Aug 7, 2009 at 12:50 AM, wsmith84<to...@gmail.com> wrote:
>
> I have a CSV file I'm reading in delay times from for start times for a soap
> message sampler
>
> basically I'm trying to first recreate actual usage of a web service by
> setting
> up a csv file with a variable called 'startTime' that contains the times
> when the web service was called,
> and later have a flexible way to simulate more traffic -
> I'd like to add more users but each user reads a new line from the
> cvs file - instead of having to create a new CSV file with more start times,
> I'd like to use the same one but add some time increment
> to each value.

first of all, in the csv data set config, set the sharing mode to
Current thread (this will allow each user to read every line from the
CSV independently of the other threads).

>
> ideally if user1 could read the variable from the line from the CSV file,
> and the next user (user2) could add some time increment to the value
> that user1 read and use that as its delay.
>
> so if my CSV file of start times looks like:
> 1200
> 1500
> 2500
>
> user1 would fire off the sampler at 1200, 1500, and 2500 milliseconds,
> and user2 would fire off the same sampler at 1400, 1700, and 2700  (adding
> 200
> milliseconds to the delay times of user1)
>

since the value you choose to increment is static, 200ms in the
example above, a counter config element would also be in order (config
element on version 2.3.4, in 2.3.2 was a pre-processor). you set
increment value to 200.

give each user the value of startTime + counterValue by using the
__intSum function.

use the debug sampler to see what timeout values you give for various
users in a small test (3-5 users) and if it works use it for as many
users as you need.

> right now I have the following hierarchy:
>
> - test plan
>  - mythreadgroup
>    -mySampler
>       -myCSVstarttime data set config
>       -Constant Timer
>       -Response Assertion
>       -View Results tree
>
> mythreadgroup is set to loop forever
> myCSVstarttime data set config file
> is set to recycle on EOF =false and stop thread on EOF=true
> constant timer component has a delay time = ${startTime}  (which defined in
> the CSV file)
>
>
> any ideas how to do this?
>
>
> thanks
> --
> View this message in context: http://www.nabble.com/multiple-users-threads-using-the-same-CSV-variable-value-tp24855119p24855119.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
>
>

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