# Gatling During bucle doesn't works?

**URL:** <https://community.gatling.io/t/gatling-during-bucle-doesnt-works/758>\
**Category:** Gatling (Open-Source)\
**Created:** [January 2, 2014, 7:14pm UTC](https://community.gatling.io/t/gatling-during-bucle-doesnt-works/758 "2014-01-02T19:14:53Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Francisco\_Manuel\_Ser](https://avatars.discourse-cdn.com/v4/letter/f/b487fb/32.png) [@Francisco\_Manuel\_Ser](https://community.gatling.io/u/Francisco_Manuel_Ser)\
**Post date:** [January 2, 2014, 7:14pm UTC](https://community.gatling.io/t/gatling-during-bucle-doesnt-works/758/1 "2014-01-02T19:14:53Z")

</div>

I’m running a basic test:

class TestingDuration extends Simulation {

val httpConf = httpConfig  
.baseURL(“[http://mywebsite.com](http://mywebsite.com)”)

val scn = scenario(“Stress”)  
.during(120 seconds) {  
exec( http(“home”).get("/"))  
.pause(1,5)  
}

setUp(scn.users(100).ramp(20).protocolConfig(httpConf))  
}

I want that 100 users request / during 120 seconds. When I run it in Gatling each user only request one time.

Anyone knows why??

Thanks!!

---

<div class="post-metadata">

**Author:** ![Excilys](https://avatars.discourse-cdn.com/v4/letter/e/8797f3/32.png) [@Excilys](https://community.gatling.io/u/Excilys)\
**Post date:** [January 2, 2014, 7:32pm UTC](https://community.gatling.io/t/gatling-during-bucle-doesnt-works/758/2 "2014-01-02T19:32:34Z")

</div>

Are you sure you properly saved your file?  
Which version do you use?

---

<div class="post-metadata">

**Author:** ![Francisco\_Manuel\_Ser](https://avatars.discourse-cdn.com/v4/letter/f/b487fb/32.png) [@Francisco\_Manuel\_Ser](https://community.gatling.io/u/Francisco_Manuel_Ser)\
**Post date:** [January 2, 2014, 9:22pm UTC](https://community.gatling.io/t/gatling-during-bucle-doesnt-works/758/3 "2014-01-02T21:22:11Z")

</div>

Yes, the file load without errors. Gatling 1.5.3 bundle. I think that its the basic test:

It’s all file:

=== BEGIN==

import com.excilys.ebi.gatling.core.Predef.\_  
import com.excilys.ebi.gatling.http.Predef.\_  
import com.excilys.ebi.gatling.jdbc.Predef.\_  
import com.excilys.ebi.gatling.http.Headers.Names.\_  
import akka.util.duration.\_  
import bootstrap.\_

class TesingStress extends Simulation {

val httpConf = httpConfig  
.baseURL(“[http://www.mysite.test](http://www.mysite.test/)”)

val scn = scenario(“Stress”)  
.during(120 seconds) {  
exec( http(“home”).get("/"))  
.pause(1,5)  
}

setUp(scn.users(100).ramp(20).protocolConfig(httpConf))  
}

===END===

(change mysite.test with realserver url)

¿if you use this, run 100 users during 120 seconds with a lot of “get” by each user?

In my gatling only run 100 users with 1 get by each user.

Thanks!

---

<div class="post-metadata">

**Author:** ![Excilys](https://avatars.discourse-cdn.com/v4/letter/e/8797f3/32.png) [@Excilys](https://community.gatling.io/u/Excilys)\
**Post date:** [January 2, 2014, 9:48pm UTC](https://community.gatling.io/t/gatling-during-bucle-doesnt-works/758/4 "2014-01-02T21:48:38Z")

</div>

Just ran a quick test against [http://www.google.fr](http://www.google.fr) with 20 users instead of 100 (in order not to be banned).  
Got about 780 requests over 140 seconds (ramp + during loop), so a mean 5,6 req/s.  
This value looks good to me: you have at most 20 concurrent users, if responses are immediate, and mean pauses are 3 seconds (1, 5), you’d expect at most 20/3=6,7 req/s.

What do your stats look like?

---

<div class="post-metadata">

**Author:** ![Francisco\_Manuel\_Ser](https://avatars.discourse-cdn.com/v4/letter/f/b487fb/32.png) [@Francisco\_Manuel\_Ser](https://community.gatling.io/u/Francisco_Manuel_Ser)\
**Post date:** [January 2, 2014, 9:57pm UTC](https://community.gatling.io/t/gatling-during-bucle-doesnt-works/758/5 "2014-01-02T21:57:24Z")

</div>

SOLVED!!!

The problem was that http was catching. If I use “.disableCaching” works fine!!!

I saw the solution here: [https://groups.google.com/forum/#!topic/gatling/ezNVDe9ZsDE](https://groups.google.com/forum/#!topic/gatling/ezNVDe9ZsDE)

Stephane many Thanks!

---

<div class="post-metadata">

**Author:** ![Excilys](https://avatars.discourse-cdn.com/v4/letter/e/8797f3/32.png) [@Excilys](https://community.gatling.io/u/Excilys)\
**Post date:** [January 2, 2014, 10:01pm UTC](https://community.gatling.io/t/gatling-during-bucle-doesnt-works/758/6 "2014-01-02T22:01:32Z")

</div>

Ahhhh  
By default, Gatling behaves like a browser, so if your page is cached with Expires header, Gatling won’t even issue a request.

Glad you solved it!  
That’s a classic pitfall and I tend to forget it…

---

<div class="post-metadata">

**Author:** ![Francisco\_Manuel\_Ser](https://avatars.discourse-cdn.com/v4/letter/f/b487fb/32.png) [@Francisco\_Manuel\_Ser](https://community.gatling.io/u/Francisco_Manuel_Ser)\
**Post date:** [January 2, 2014, 10:05pm UTC](https://community.gatling.io/t/gatling-during-bucle-doesnt-works/758/7 "2014-01-02T22:05:53Z")

</div>

Thanks a lot for your help 😉  
Happy New Year!!

---

<div class="post-metadata">

**Author:** ![Excilys](https://avatars.discourse-cdn.com/v4/letter/e/8797f3/32.png) [@Excilys](https://community.gatling.io/u/Excilys)\
**Post date:** [January 2, 2014, 10:07pm UTC](https://community.gatling.io/t/gatling-during-bucle-doesnt-works/758/8 "2014-01-02T22:07:07Z")

</div>

My pleasure!

Happy New Year too 🙂
