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

**URL:** <https://community.gatling.io/t/trying-to-set-up-a-gatling-scenario-similar-to-a-loadrunner-scenario/5598>\
**Category:** Gatling (Open-Source)\
**Created:** [April 28, 2020, 8:24pm UTC](https://community.gatling.io/t/trying-to-set-up-a-gatling-scenario-similar-to-a-loadrunner-scenario/5598 "2020-04-28T20:24:17Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Randy\_Stevenson](https://avatars.discourse-cdn.com/v4/letter/r/49beb7/32.png) [@Randy\_Stevenson](https://community.gatling.io/u/Randy_Stevenson)\
**Post date:** [April 28, 2020, 8:24pm UTC](https://community.gatling.io/t/trying-to-set-up-a-gatling-scenario-similar-to-a-loadrunner-scenario/5598/1 "2020-04-28T20:24:17Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![slandelle](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/slandelle/32/4_2.png) [@slandelle](https://community.gatling.io/u/slandelle)\
**Post date:** [April 29, 2020, 7:49pm UTC](https://community.gatling.io/t/trying-to-set-up-a-gatling-scenario-similar-to-a-loadrunner-scenario/5598/2 "2020-04-29T19:49:28Z")

</div>

> 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.

---

<div class="post-metadata">

**Author:** ![Randy\_Stevenson](https://avatars.discourse-cdn.com/v4/letter/r/49beb7/32.png) [@Randy\_Stevenson](https://community.gatling.io/u/Randy_Stevenson)\
**Post date:** [May 5, 2020, 7:54pm UTC](https://community.gatling.io/t/trying-to-set-up-a-gatling-scenario-similar-to-a-loadrunner-scenario/5598/3 "2020-05-05T19:54:40Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![slandelle](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/slandelle/32/4_2.png) [@slandelle](https://community.gatling.io/u/slandelle)\
**Post date:** [May 5, 2020, 8:12pm UTC](https://community.gatling.io/t/trying-to-set-up-a-gatling-scenario-similar-to-a-loadrunner-scenario/5598/4 "2020-05-05T20:12:10Z")

</div>

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,

---

<div class="post-metadata">

**Author:** ![Aravind\_G](https://avatars.discourse-cdn.com/v4/letter/a/8e8cbc/32.png) [@Aravind\_G](https://community.gatling.io/u/Aravind_G)\
**Post date:** [September 14, 2020, 8:09am UTC](https://community.gatling.io/t/trying-to-set-up-a-gatling-scenario-similar-to-a-loadrunner-scenario/5598/5 "2020-09-14T08:09:37Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![slandelle](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/slandelle/32/4_2.png) [@slandelle](https://community.gatling.io/u/slandelle)\
**Post date:** [September 14, 2020, 8:32am UTC](https://community.gatling.io/t/trying-to-set-up-a-gatling-scenario-similar-to-a-loadrunner-scenario/5598/6 "2020-09-14T08:32:45Z")

</div>

Exactly

---

<div class="post-metadata">

**Author:** ![Aravind\_G](https://avatars.discourse-cdn.com/v4/letter/a/8e8cbc/32.png) [@Aravind\_G](https://community.gatling.io/u/Aravind_G)\
**Post date:** [September 14, 2020, 10:05am UTC](https://community.gatling.io/t/trying-to-set-up-a-gatling-scenario-similar-to-a-loadrunner-scenario/5598/7 "2020-09-14T10:05:36Z")

</div>

Thanks Stéphane , then it solves the query which I asked separately in this group. I will post this conversation thread there.
