jmeterperformance-testingload-testing

Apache JMeter Load Testing - Load test over certain period of time


I want to load test my web application using JMeter, previously I load test multiple times. But I want to load test it for certain period.
Example: I want to hit or load test it for 1000 requests within time limit of 1 hour.
Simply, 1000 requests should triggered within 1 hour not more than that or not less than that time.
Is this possible in JMeter or is there any additional plugin for the same?
What JMeter configurations should I keep for this scenario like thread and loop count etc.?

I tried by giving duration time but my web application able to server that much requests within 20 minutes only.
I want to check for 1hr with same no of requests.
What JMeter configurations should I do for this scenario like thread and loop count etc.


Solution

  • If you just want to limit the number of requests to 1000 - use Throughput Controller:

    enter image description here


    In case you want to evenly distribute 1000 request across 1 hour: the easiest is going for Precise Throughput Timer, the appropriate configuration would be:

    enter image description here

    Another option is Constant Throughput Timer

    enter image description here

    The value of 16,666666666666667 requests per minute calculated as follows:

    1000 requests per hour / 60 minutes per hour
    

    Loop count needs in the Thread Group to be set to -1 or you need to tick Forever

    The number of threads - it's the question to you, it should be sufficient for generating 17 requests per minute.