Is it possible to have threads execute independently of each other in a JMeter test script?

StackOverflow https://stackoverflow.com/questions/23408716

  •  13-07-2023
  •  | 
  •  

Question

I've got a pretty basic test plan in JMeter consisting of a Thread Group and a bunch of HTTP Requests separated by Timers and a Summary Report. I notice when I watch the report that all 10 of my threads make the first request, then pause for some time, then all make the second request.

Is it possible to have each thread execute the full script independently of the others so that (given a Ramp-up delay) you have overlapping workload, i.e. some threads executing the first step while others are on the 3rd or 4th etc?

Était-ce utile?

La solution

Threads DO execute independently in JMeter.

  1. Make sure you are you using any Ramp-up period in the thread group definition.

  2. Another reason for what you're seeing is probably due to using a constant timer which ends up in requests looking they they are synchronized. If you simply change it to one of the Random timers you'll get more randomness in the delay between requests.

Here are two good sources about timers:
http://performancetestersdiary.wordpress.com/2013/03/06/jmeter-timers-in-pictures/ http://www.softwaretestingclass.com/timers-in-jmeter-tutorial-series-6/

Autres conseils

Yes, Threads DO execute independently in JMeter, but,if you start at the same time and do the same things, all the requests will be issued at the same time (specially if you are using a constant throughput timer).
I use two way of approaching this problem:

  1. use a uniform random timer under a "once Only controller", at the beginning of the thread. The value of the timer should be close equal or close to the time it takes to execute the service.
  2. use rampup time (same value as above). It is deterministic and simpler to use (which can be bad or good, according to your needs.

Click on your "Test Plan"

Check/Select the Property: Run Threads consecutively (i.e. Run Groups one at a time)

Hope this will help.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top