How to run the load test for one hour duration and how to ramp down users in case if we use .forever in gatling

Hello,

We’ve scenario load model like below as follows.
–Need to ramp up 40 users, 1 every user for 2 seconds
–Duration to run the test is 1 hour
–And ramp down 40 users, 1 every user for 2 seconds

How to achieve this in Gatling?

I tried with below inject setup. But it runs only for 5 minutes. Then i used .forever with “.maxDuration(60 minute)”. But users are not ramping down. They’re still active status even test is completed in 60 minutes. Can you pls let me know how to ramp down the users when we used .forever().

With out .forever():

setUp(
		scn.inject(
			nothingFor(5 seconds),
			atOnceUsers(10),
			rampUsers(40) during (20 second)
		).protocols(httpProtocol)
	)

With `.forever()``

	setUp(
		scn.inject(
			nothingFor(5 seconds),
//			atOnceUsers(10),
			rampUsers(40) during (20 second)
		).protocols(httpProtocol)
	).maxDuration(60 minute)

Can someone pls look at this issue and let’s know if any resolution for this.

Appreciate for your quick response!

Thanks.

Can anyone pls help me on this above issue.

We’ve scenario load model like below as follows.
–Need to ramp up 40 users, 1 every user for 2 seconds
–Duration to run the test is 1 hour
–And ramp down 40 users, 1 every user for 2 seconds

No offense, but this specification is lacking.

I recommend that you watch this talk. This will help you properly understand how to specify your load profile.

Hi Stephane,

Thanks for your response.

Can we use below setup for this above scenario.

setUp(
scn.inject(
rampConcurrentUsers(1) to (40) during (80 seconds),
constantConcurrentUsers(40) during (60 minutes)
rampConcurrentUsers(40) to (1) during (80 seconds)
).protocols(httpProtocol)
)

Thanks.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.