my aim is to run a simple test, rampup 100 users in 10 min, stay in duration phase of 1 hr doing same transactions , rampdown in 2 min
i am trying to use the below command, but don’t want to give max Duration.
setUp(scn.inject(rampUsers(100) during (10 minutes))).maxDuration(10 minutes)
Tried the below one also but no luck.
setUp( scn.inject(
rampUsers( 100 ) during ( 10 minutes ),
nothingFor( 70 minutes )
).protocols(httpProtocol)
pls help resolve this issue.
I was able to achieve it by adding .duration(time-required) and looping the transactions inside it.
private val scn = scenario("User login")
.during(60 minutes) {
exec(http("login successful")
.post("/customer-service/api/login")
.body(StringBody("""{ "username": "hi@testmail.com", "password": "12345" }"""))
.check([status.is](http://status.is/)(200)))
}
Hi Sunil,
glad you could figure it out. I suggest you to follow some tutorials for Gatling as this is a basic configuration. You may check on Udemy or some blog posts to expand your knowledge further.