rsfan23
rsfan23

Reputation: 71

Jmeter - how to add delay between requests in concurrency thread group

I have a load test case, where the user first requests an access token and then sends second request to a REST API endpoint. The number of users increases by 10 every 5 seconds, ie. 10 requests at test start, after 5 seconds 20 requests, after another 5 seconds 30 requests, etc. However I would like to send requests only once every 5 seconds, when the number of users increases. Is there a way to achieve this in Jmeter?

I decided to choose concurrency thread group and flow control action for my solution, but it doesn't feel accurate enough, when I check the report dashboard, the number of token requests and API calls do not match, although they should. Is there a better way to do this?

  1. Here's my concurrency thread group setup

  2. Thread group setup, in the flow control action sampler I set pause to 5000 ms

enter image description here

Upvotes: 0

Views: 299

Answers (1)

Dmitri T
Dmitri T

Reputation: 168147

If you really want to send 1 request each 5 seconds you can consider using Throughput Shaping Timer configured like:

enter image description here

However I fail to see why would you need 120 users in that case, 1 user will be more than sufficient.

More information: Using JMeter’s Throughput Shaping Timer Plugin

Upvotes: 1

Related Questions