0

I need to trigger a same API 30 times in a second from which only 20 will trigger successfully remaining will failed as we have allowed 20 requests at a time to trigger if it is sent concurrently. More than this 20 apis will throw a error message for the reamining 10 apis.

How to achieve this in Jmeter I have done the same using Karate framework which has triggered 30 requests at a time(concurrently) 20 has passed and remaining 10 has failed. How to achieve this is Jmeter. Kindly help someone.

I'm expecting the 30 requests to trigger at a time (concurrently) without a delay. But after numerous times all the solutions went in vain as the 30 requests has passed successfully meaning they were getting triggered sequentially not concurrently.

2
  • Can you attach some code samples that you have tried? Commented Jul 4 at 5:02
  • 1. I have used a thread group with 30 threads (same API) added ramp-up time and ramp-up step up as 0. Checked the Single user making call maintaining the thread for 1 second. 2. Above mentioned thread group along with the Constant throughput controller 3. Tried Adding bm Concurrency thread group All of them were given same result ie; all 30 threads were triggered successfully
    – Arun Sabee
    Commented Jul 4 at 5:10

1 Answer 1

0

If you want to run a request with 30 concurrent users for a certain period of time - make sure to provide enough iterations on the Thread Group level as you can run into the situation when some threads already did their work and were shut down and the others had not been started yet.

enter image description here

If you want to run 30 concurrent requests at exactly the same moment of time - add a Synchronizing Timer and set the number of simulated users to group by to 30

enter image description here

There are more Timers like Constant Throughput Timer where you can specify the desired number of requests per minute.

Not the answer you're looking for? Browse other questions tagged or ask your own question.