how to run multiples scenarios with 3(specific number ofusers) users for a period of 1hour(a specific period) in gatling

74 views
Skip to first unread message

Srinivas Archak

unread,
May 27, 2015, 7:58:33 AM5/27/15
to gat...@googlegroups.com
I have a testc ase where I need to run a series of scnearios for 1 hour. How do we specify this in gatling. Please see the simulation set up below.

setUp(scn1.inject(rampUsers(3) over(30 minutes)),
scn2.inject(rampUsers(3) over(30 minutes)),
scn3.inject(rampUsers(3) over(30 minutes)),
scn4.inject(rampUsers(3) over(30 minutes)),
scn5.inject(rampUsers(3) over(30 minutes)),
scn6.inject(rampUsers(3) over(30 minutes)),
scn7.inject(rampUsers(3) over(30 minutes)),
scn8.inject(rampUsers(3) over(30 minutes)),
scn9.inject(rampUsers(3) over(30 minutes)),
scn10.inject(rampUsers(3) over(30 minutes)),
scn11.inject(rampUsers(3) over(30 minutes)),
scn12.inject(rampUsers(3) over(30 minutes)))

I want all the scenarios to be run with 3 users and for a duration of 30 minutes. Please see the simulation file attached.

I would like to run my scenarios with standard users of 3 for a period of 1 hour. How can I do this in gatling?
largefiletest2.scala

Stéphane LANDELLE

unread,
May 27, 2015, 8:00:22 AM5/27/15
to gat...@googlegroups.com
"I want all the scenarios to be run with 3 users and for a duration of 30 minutes." = closed model = atOnceUsers(3) + during(30 minutes) loop wrapping your scenario.

Stéphane Landelle
Lead developer


--
You received this message because you are subscribed to the Google Groups "Gatling User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gatling+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Srinivas Archak

unread,
May 27, 2015, 12:54:48 PM5/27/15
to gat...@googlegroups.com
stephane,

you mean to say I should define the scenarios as below

 setUp(scn1.inject(atOnceUsers(3) during(30 minutes)),
scn2.inject(atOnceUsers(3) during(30 minutes)),
scn3.inject(atOnceUsers(3) during(30 minutes)),
scn4.inject(atOnceUsers(3) during(30 minutes)),
scn5.inject(atOnceUsers(3) during(30 minutes)),
scn6.inject(atOnceUsers(3) during(30 minutes)),
scn7.inject(atOnceUsers(3) during(30 minutes)),
scn8.inject(atOnceUsers(3) during(30 minutes)),
scn9.inject(atOnceUsers(3) during(30 minutes)),
scn10.inject(atOnceUsers(3) during(30 minutes)),
scn11.inject(atOnceUsers(3) during(30 minutes)),
scn12.inject(atOnceUsers(3) during(30 minutes))).

when I did that it gives the following error

value during is not a member of io.gatling.core.controller.inject.AtOnceInjection

22:21:34.791 [ERROR] i.g.c.ZincCompiler$ -     setUp(scn1.inject(atOnceUsers(3) during(30 minutes)),

Please can you correct the attachment I have posted .

Srinivas


srinivas

Stéphane LANDELLE

unread,
May 27, 2015, 1:37:27 PM5/27/15
to gat...@googlegroups.com
No.

Please read the documentation and search for "during" loop.

Stéphane Landelle
Lead developer


Reply all
Reply to author
Forward
0 new messages