Trying to achieve linear active users graph with maxDurarion

Hi All,

I am running below script to achieve linear active users graph and for that, I have kept my request in scenario forever loop and trying to exit the simulation with maxDuration so that all users will be active till the max duration ends. But seeing some deviation in the result(screenshot attached ) as my simulation is running only for 10 seconds where my provided parameters duration 20 min and max duration 20 min. Below are the following input and script.

Below script, I am running the test with inputs num of users 100000, duration 1200 seconds(20 min) and maxDuration 20 min.

Here is my script

def linearUsersloadTestScenario() =
scenario(LINEAR_USERS_LOAD_TEST_SCENARIO)
.forever {
tracePost(LINEAR_USERS_LOAD_TEST_REQUEST)
}

setUp(
linearUsersloadTestScenario.inject(
rampUsers(100000) during (1200)))
.assertions(global.successfulRequests.percent.gt(ZERO))
.protocols(HTTP_PROTOCOL).maxDuration(20)

Note: The same simulation script working perfectly fine with less load.

Thanks & Regards,
Ratnesh.

> Below script, I am running the test with inputs num of users 100000, duration 1200 seconds(20 min) and maxDuration 20 min.

.protocols(HTTP_PROTOCOL).maxDuration(20)

No you’re not: in Gatling, the default time unit is seconds. You want maxDuration(20 minutes).

Then, you’re very unlikely to be able to run 100,000 concurrent virtual users from one single machine.
You’ll need a solution that supports distributed tests, typically FrontLine.

Regards,

Hi Stéphane,

But I am able to run till 1M users with other profile injection with my job and only I am facing this issue while using max duration.

Thanks,

Regards,
Ratnesh.

Because you’re confusing 1M users in total, with just some reasonable number of concurrent users at any given point in time, and 1M concurrent users at a given / any time.

Hi Stéphane,

Thanks for correcting me, I am just trying to craft users linearly where I could see linear active users Graph along with the simulation so could you please suggest me what all the way to achieve this type of scenario in Gatling.

Thanks & Regards,
Ratnesh.