I have a JMeter Testplan which tests approx 20 different requests. For each request to be tested I want to specify a different constant throughput timer. E. g. Request 1 has constant throughtput of 10 / min and request 2 has constant throughput of 5 / min. However, the constant throughput timer always overrides the next one so that the constant throughput timers are not individual for each request.
3 Answers
All the requests are in the same Thread Group. As there are no logical controllers in the test plan requests are executed one after another. When Constant Throughput Timers are introduced as child to the request JMeter tries to create request to maintain the specified throughput if server can handle them.
Subsequent requests are executed once the previous requests are executed. Hence throughput cannot be generated as specified.
If there is no dependency among the requests throughput can controlled by organizing the requests across independent Thread Groups.
The "slowest" Constant Throughput Timer will slow down the other requests as JMeter waits for the previous sampler completion prior to starting the next one.
So if you need to execute Samplers with different throughput you need to place them under different Thread Groups
If you will need to pass data between thread groups it can be done in 2 ways:
- By calling __setProperty() function in one thread group to write data into a Java Property which can be read anywhere else via __P( ) function
- By using Inter-Thread Communication Plugin