Hello all,

So I am a little confused with how variables are working in a single Thread
Group.

I have attached a "User Defined Variables" config element to my thread
group.  From there I setup a HTTP Request sampler under the thread group.  I
also under the thread group have a BeanShell Sampler with a script that
basically acts as a special counter to modify the User defined variables
that are used in the Http request.

But when I run the test using say 3 threads and 1 loop, it only makes 3 http
requests using the same value of the variable (the initial).  If I run it
with 1 thread and 3 loops, it works as intended, giving 3 different values
properly incremented by the BeanShell sampler.

In reading I ran across something that mentioned using JMeter Properties to
share values between threads.  But even with that I am still not able to get
it to properly use the values.

What is the proper/best way to have a shared value among all the threads so
that it increments properly?  And is a BeanShell sampler the proper way to
ensure it increments properly?  I am using a CSV data set config for the
http request for two variables in it.  So essentially the CSV has a static
list of values that is looped through but the counter should keep going up
independently of that and just tags those values.

My test hierarchy looks as such:

Test plan
   |- Thread Group
      |- Http Request
         |-Simple Data Writer
      |- BeanShell Sampler
   |- User Defined Variables

Hopefully that is clear enough, if not, let me know I can provide any
additional details/samples.

Thanks!

-- 
Joshua Abts

Reply via email to