Leonardo
Leonardo

Reputation: 11401

Gatling - How to set up Looping users?

According to the documentation apparently I can either insert a fixed number of users at a per-second rate for a given time using constantUsersPerSec(rate) during(duration) or insert a number of users using atOnceUsers(nbUsers).

What I would like is a fixed number of concurrent users looping. You using constantUsersPerSec(5), if the first batch didn't finish, in the next sec, five new users will be pushed. I would like to only push a new user when the any finishes.

In another words I want something like: atOnceUsers(nbUsers) and whenever any ends up, add another one and keep that up for 5 minutes

How can I achieve that?

Upvotes: 1

Views: 772

Answers (2)

Stéphane LANDELLE
Stéphane LANDELLE

Reputation: 6623

What I would like is a fixed number of concurrent users

atOnceUsers

looping

https://docs.gatling.io/reference/script/core/scenario/#loop-statements

Injection profile only control users spawning. Users' lifespan is controlled by the scenario.

Upvotes: 2

James Warr
James Warr

Reputation: 2604

it sounds like you want

constantConcurrentUsers(5) during (5 minutes)

Upvotes: 1

Related Questions