Finlay Weber
Finlay Weber

Reputation: 4163

How to run test for 1 hr and make exactly x amount of requests

I am struggling with how to configure my jmeter test to run for a specific amount of time.

I am using the access log sampler. I am configuring the group threads and the loop count. But it seems if I increase the group threads, the amount will still launch a request in 1 seconds. If I increase the loop count...it still end up running in a seconds.

I know the amount of request I need per second. I used this as the group threads. If I can make the group thread run per second then my problem is solved, then I can use the loop count to repeat 3600 times to make an hour...but this does not seem o be the case. The amount requests specified via the group threads run in less than a second!...

How do I configure the tests so that it runs in say 1 hr?

Upvotes: 1

Views: 1934

Answers (1)

Dmitri T
Dmitri T

Reputation: 168052

  1. If you look at JMeter's Thread Group you will see Specify thread lifetime input:

    enter image description here

    this is how you can control for how long JMeter threads are allowed to run

  2. If you want to send specific amount of requests during this hour consider using Constant Throughput Timer, but be aware of the following:

    • Constant Throughput Timer can only pause JMeter threads to limit the throughput (number of requests per minute) to the given value
    • JMeter must be able to "fire" requests fast enough so make sure to follow JMeter Best Practices
    • Your application must be able to respond fast enough because JMeter waits for previous request to finish prior to starting a new one so if your application is too slow you cannot force it to respond faster

Upvotes: 1

Related Questions