Trying to set up a Gatling Scenario similar to a LoadRunner Scenario

85 views
Skip to first unread message

Randy Stevenson

unread,
Apr 28, 2020, 4:24:53 PM4/28/20
to Gatling User Group
In LoadRunner, I can set up a test where I ramp up users to reach 500 concurrent users, then stay at that level for 20 minutes --- running continuous iterations over that period. Each user only logs in one time, but continues to work over the 20 minute period.

The application being tested is a quite common design at Deere --- A portal type application in which a Dealer logs into a system and stays logged in over long periods of time, performing various business activities.

Typically I would have a ramp up rate of 10 users every 15 seconds until I reached 500, so the total test run time would be 32 minutes and 30 seconds.

How can I set up this type of scenario in Gatling?

I thought I would do something like this:  

First, I put a .repeat in the scn section of my script:

    val scn = scenario("DealerPathUC1")
     
.feed(csvSAMLResponseFeeder)
     
.feed(csvDealerFeeder)
       
.exec(Access_Site())
       
.pause(5 seconds)
       
.exec(Login())
       
.pause(5 seconds)
     
.repeat(10)(
         
exec(BusinessAdmin())
       
.pause(5 seconds)
       
.exec(SupplierDiscounts())
       
.pause(5 seconds)
       
.exec(ShopAtJDIS())
       
.pause(5 seconds)
       
.exec(MyDealerPath())
       
.pause(5 seconds)
       
.exec(PartsAndAttachments())
       
.pause(5 seconds)
       
.exec(BarCodeInformation())
       
.pause(5 seconds)
       
.exec(ShowroomProcessOptimization())
       
.pause(5 seconds)
       
.exec(MyDealerPath2())
       
.pause(5 seconds)
       
.exec(ServiceAndSupport())
       
.pause(5 seconds)
       
.exec(MyDealerPath3())
       
.pause(5 seconds)
       
.exec(Sales())
       
.pause(5 seconds)
       
.exec(PriceBooks())
       
.pause(5 seconds)
       
.exec(MyDealerPath4())
       
.pause(5 seconds)
       
.exec(MarketingAndAdvertising())
       
.pause(5 seconds)
       
.exec(eLeader())
       
.pause(5 seconds)
       
.exec(MyDealerPath5())
       
.pause(5 seconds)
     
)

And then I set up the injection schedule:


setUp(
    scn
.inject(
      constantConcurrentUsers
(500) during (20 minutes),
      rampConcurrentUsers
(10) to (500) during (13 minutes)
   
)
).protocols(httpProtocol)

But this does not behave as I would understand the syntax in Gatling.

I have tried to find others with similar scenario design questions, but apparently I am not getting a good understanding of things.

Thanks,
Randy

Stéphane LANDELLE

unread,
Apr 29, 2020, 3:50:00 PM4/29/20
to gat...@googlegroups.com
>  I ramp up users to reach 500 concurrent users, then stay at that level for 20 minutes --- running continuous iterations over that period. Each user only logs in one time, but continues to work over the 20 minute period.

rampUsers(500) during(13 minutes)

have a during loop after initial login that lasts 33 minutes

either abruptly stop test after 33 minutes with maxDuration, or let users ramp down naturally. 


Logo Stéphane Landelle
Chief Technical Officer
twitter: @slandelle
site:
gatling.io




--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/gatling/64f38f21-8136-4294-9542-6f735aba9ed5%40googlegroups.com.

Randy Stevenson

unread,
May 5, 2020, 3:58:31 PM5/5/20
to Gatling User Group
Thank you, as usual, Stephane. 

I still feel like I am beating my head against the wall at times, but you help ease at least some of my pain.

Randy
To unsubscribe from this group and stop receiving emails from it, send an email to gat...@googlegroups.com.

Stéphane LANDELLE

unread,
May 5, 2020, 4:12:45 PM5/5/20
to gat...@googlegroups.com
In Gatling, injection profiles only control when users are started either based on arrival rate (open model) or concurrent users (closed model).
Users lifespans only depend on their scenario.

Hope it helps,


Logo Stéphane Landelle
Chief Technical Officer
twitter: @slandelle
site:
gatling.io



To unsubscribe from this group and stop receiving emails from it, send an email to gatling+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gatling/89ac121f-1996-4269-977e-fff707a527b1%40googlegroups.com.

Aravind G

unread,
Sep 14, 2020, 4:11:57 AM9/14/20
to Gatling User Group
Hi  Stéphane Landelle ,

Please confirm whether I understood your statement correctly regarding this discussion.
You are saying that we can't forcefully achieve ramp down  by making the Vusers exit as per the syntax. 
And also if we want to stop the test we can use maxduration but there won't be any ramp down when we see in the report of index.html file.

Regards,
Aravind Ganesan

Stéphane LANDELLE

unread,
Sep 14, 2020, 4:33:20 AM9/14/20
to gat...@googlegroups.com
Exactly


Logo Stéphane Landelle
Chief Technical Officer
twitter: @slandelle
site:
gatling.io



Aravind G

unread,
Sep 14, 2020, 6:06:08 AM9/14/20
to Gatling User Group
Thanks  Stéphane   , then it solves the query which I asked separately in this group. I will post this conversation thread there.
Reply all
Reply to author
Forward
0 new messages