1
votes

I am trying to run a post request in Jmeter. I want 10 requests to fire per second over a period of 1 hour. How could I achieve this?

Looking around, Constant Throughput Timer seems to be the popular option.

But for some reason, no matter what I switch around, I end up with only 500 requests. Can I please get some guidance as to why? It feels like such a basic option yet I simply can't figure it out. Been at it for hours and just not going anywhere.

My settings (For testing just trying with 2 mins, so I expect to end up with 1200 requests).

Thread Group:

Number of threads: 20 Ramp Up Period: 1

Scheduler checked.

Duration Set for 120 seconds (2 mins).

enter image description here

I then go on to add the Constant Throughput Timer. I set the value to 600 (Thus 10 requests per second).

enter image description here

As mentioned above, running this gives me 500 requests... I was expecting 1200 requests.. Why? Even if I extent mu duration to 3 mins, it would still be 500. Please help.

1
The screenshots show 10 seconds as test duration against 2 minutes/3 minutes. Please post the appropriate screenshot. Also, paste the aggregate report's output along with overall view of JMeter's UI post test (want to check if any errors and concurrency achieved by JMeter) to help narrow down the issue.M Navneet Krishna

1 Answers

0
votes

Constant Throughput Timer can only pause the threads to the desired throughput so if you want to achieve 10 requests per second with 20 users your application must be at most 500ms, if it will be higher - the number of requests per unit of time will be proportionally less.

  1. So first of all try increasing the number of threads
  2. Make sure to follow JMeter Best Practices (just in case JMeter is not capable of sending requests fast enough)
  3. You may find Concurrency Thread Group and Throughput Shaping Timer more convenient and precise, moreover this combination can kick off extra threads if current amount is not enough in order to reach/maintain the defined throughput