You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Sharmadha <ss...@hortonworks.com> on 2016/03/23 07:55:32 UTC

Run multiple samplers for multiple users in sequence

I have the following structure :

Threadgroup - users 50
     +sampler1
     +sampler2
     +sampler3
     +csv data config
My requirement is I want to run sampler 1,sampler 2 ,sampler 3 continuously
for every user.

In the View Result tree listener, I see,

sampler1
sampler1
sampler1 ... and when all sampler1 for 50 users are over , only then
sampler2 starts . How to ensure the order ?



--
View this message in context: http://jmeter.512774.n5.nabble.com/Run-multiple-samplers-for-multiple-users-in-sequence-tp5723987.html
Sent from the JMeter - User mailing list archive at Nabble.com.

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


Re: Run multiple samplers for multiple users in sequence

Posted by sebb <se...@gmail.com>.
On 23 March 2016 at 07:05, Sharmadha <ss...@hortonworks.com> wrote:
> Since I have set values for samplers to be taken from a CSV file ,I also want
> to ensure if each sampler takes the same value from the file for a user .
> For example, in View Results Tree,(users -50)
>
> sampler1 (Sampler result - Thread Group 1-8 ) (takes value "a" from file )
> sampler1 (Sampler result - Thread Group 1-7 ) (takes value "b" from file )
> sampler1 (Sampler result - Thread Group 1-6 ) (takes value "c" from file )
> ....
>
> sampler2 (Sampler result - Thread Group 1-8 )(takes value "a" from file)
> ....
>
> sampler 3 (Sampler result - Thread Group 1-8 )(takes value "a" from file)
> .....
>
> So can I believe that user 8 executes sampler 1 taking value "a" and
> executes sampler 2 with the same value ? Will this happen everytime or it
> may change ?  (as in , user 8 takes value "a" for sampler1 and "b" for
> sampler2 and "c" for sampler3)
>

If you want to find out how JMeter behaves, the best is to create a
test plan using something like the Debug Sampler or the Java Sampler.
Both of these can be used to display the values of variables.

>
>
>
>
> --
> View this message in context: http://jmeter.512774.n5.nabble.com/Run-multiple-samplers-for-multiple-users-in-sequence-tp5723987p5723988.html
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>

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


Re: Run multiple samplers for multiple users in sequence

Posted by Deepak Shetty <sh...@gmail.com>.
Hi
you need to look at
a) Sharing mode and the recycle options in
http://jmeter.apache.org/usermanual/component_reference.html#CSV_Data_Set_Config
b) Understand when the value changes for a CSV data set config  (e.g. when
the CSV data set is under a while controller etc)
The questions you are asking cant be answered without the test Plan and the
options you selected
if the test plan is what you posted above
  +sampler1
  +sampler2
  +sampler3
  +csv data config

Then if your sharing mode is all threads , then Thread 1 will take value of
first line "a" in your e.g. , then assuming the request didnt complete and
Thread 2 started , thread 2 will take value of second line "b" , and so on.
In thead 1 , sampler 1,2,3 will all see value "a" , till the thread group
iterates , after which it will see a new value , depending on where the
other threads are.
If on the other hand , if you used a long ramp up and Thread 1 completed
sampler 1,2,3 and started next iteration , it would see value "b" and
thread 2 might see value "c" when it started

if  your sharing mode is current thread , all threads will initially see
"a" , the samplers will all see "a", till the next iteration.






On Wed, Mar 23, 2016 at 12:05 AM, Sharmadha <ss...@hortonworks.com>
wrote:

> Since I have set values for samplers to be taken from a CSV file ,I also
> want
> to ensure if each sampler takes the same value from the file for a user .
> For example, in View Results Tree,(users -50)
>
> sampler1 (Sampler result - Thread Group 1-8 ) (takes value "a" from file )
> sampler1 (Sampler result - Thread Group 1-7 ) (takes value "b" from file )
> sampler1 (Sampler result - Thread Group 1-6 ) (takes value "c" from file )
> ....
>
> sampler2 (Sampler result - Thread Group 1-8 )(takes value "a" from file)
> ....
>
> sampler 3 (Sampler result - Thread Group 1-8 )(takes value "a" from file)
> .....
>
> So can I believe that user 8 executes sampler 1 taking value "a" and
> executes sampler 2 with the same value ? Will this happen everytime or it
> may change ?  (as in , user 8 takes value "a" for sampler1 and "b" for
> sampler2 and "c" for sampler3)
>
>
>
>
>
>
> --
> View this message in context:
> http://jmeter.512774.n5.nabble.com/Run-multiple-samplers-for-multiple-users-in-sequence-tp5723987p5723988.html
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>
>

Re: Run multiple samplers for multiple users in sequence

Posted by Sharmadha <ss...@hortonworks.com>.
Since I have set values for samplers to be taken from a CSV file ,I also want
to ensure if each sampler takes the same value from the file for a user .
For example, in View Results Tree,(users -50)

sampler1 (Sampler result - Thread Group 1-8 ) (takes value "a" from file )
sampler1 (Sampler result - Thread Group 1-7 ) (takes value "b" from file )
sampler1 (Sampler result - Thread Group 1-6 ) (takes value "c" from file )
....

sampler2 (Sampler result - Thread Group 1-8 )(takes value "a" from file)
....

sampler 3 (Sampler result - Thread Group 1-8 )(takes value "a" from file)
.....

So can I believe that user 8 executes sampler 1 taking value "a" and
executes sampler 2 with the same value ? Will this happen everytime or it
may change ?  (as in , user 8 takes value "a" for sampler1 and "b" for
sampler2 and "c" for sampler3) 






--
View this message in context: http://jmeter.512774.n5.nabble.com/Run-multiple-samplers-for-multiple-users-in-sequence-tp5723987p5723988.html
Sent from the JMeter - User mailing list archive at Nabble.com.

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


Re: Run multiple samplers for multiple users in sequence

Posted by Deepak Shetty <sh...@gmail.com>.
> and when all sampler1 for 50 users are over , only then sampler2 starts
No this isnt necessary - it might be what you are seeing in a specific case
or your samples are returning really really really quickly.
JMeter will fire threads in parallel (50 in your case) - However the first
iteration , the concurrency will be staggered by ramp up time.

Next each thread will fire the requests in Sequence specified in test plan
- so thread1 will request Sampler1 , wait for its response , once the
response is processed move on to sampler 2 - wait for that to finish and
then request sampler 3. Thread 2 will do the same thing. Depending on which
request/response finishes , you will see samples mixed. If for e.g. Thread
1 Sampler 1 takes a long time to complete but Thread 2 Sampler 1 finishes
quickly , youll see Thread 2 Sampler 2 next
 However each thread will always go in the Sequence defined in test plan


On Tue, Mar 22, 2016 at 11:55 PM, Sharmadha <ss...@hortonworks.com>
wrote:

> I have the following structure :
>
> Threadgroup - users 50
>      +sampler1
>      +sampler2
>      +sampler3
>      +csv data config
> My requirement is I want to run sampler 1,sampler 2 ,sampler 3 continuously
> for every user.
>
> In the View Result tree listener, I see,
>
> sampler1
> sampler1
> sampler1 ... and when all sampler1 for 50 users are over , only then
> sampler2 starts . How to ensure the order ?
>
>
>
> --
> View this message in context:
> http://jmeter.512774.n5.nabble.com/Run-multiple-samplers-for-multiple-users-in-sequence-tp5723987.html
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>
>