I want to simulate a scenario where a payrun contains 100 employees

Can some one help me to find a way how can i load test a Payrun with 100 employees.
I don’t want to create a payrun with 100 employees from UI and record and simulate the scenario, i want to inject the employees 10,20,50,100 and want to see the results .
So is there any way to inject employees in the application like how we can inject the users who accessing the application (setUp(scn.inject(atOnceUsers(10))).protocols(httpProtocol)) .

Appreciated your help,


Are you saying that you want 10 users to show up to your test, after that 20, then 50 and then a 100? Is that the question?

No its not the user who login into the application, my scenario is one user login into the application and can create a payrun with 10 Employees and check the load how much time it is taking to load a PayRun , and after with 20 Employees like so on.

See the attachment for details

Hi Vanaja,

you can try something like:
{object Login {

val login = exec(http(“HOME”)
//here is the code to login
//here is the code to get authorization token

object Payrun {

val payrun = exec(http(“Payrun”)
.get("/") // here is a code you needeed to test payrun
.headers(sentHeaders) //here is a code where you use your authorization token

val users = scenario(“User”).exec(Login.login)
val loggedinuser = scenario(“LoggedInUsers”).exec(Payrun.payrun)

users.inject(rampUsers(1) over (10 seconds)),
loggedinuser.inject(rampUsers(20) over (10 seconds)) //here you can manage how many and how , etc