# 0 to 5000 Users

**URL:** <https://community.gatling.io/t/0-to-5000-users/2164>\
**Category:** Gatling (Open-Source)\
**Created:** [March 31, 2015, 9:27am UTC](https://community.gatling.io/t/0-to-5000-users/2164 "2015-03-31T09:27:13Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Simon\_LEDUNOIS](https://avatars.discourse-cdn.com/v4/letter/s/59ef9b/32.png) [@Simon\_LEDUNOIS](https://community.gatling.io/u/Simon_LEDUNOIS)\
**Post date:** [March 31, 2015, 9:27am UTC](https://community.gatling.io/t/0-to-5000-users/2164/1 "2015-03-31T09:27:13Z")

</div>

Hi there!

I want to realize a special scalability test with Gatling. In fact, i want to ramp user fro 0 to 5000 in 3600 secondes. Then I wrote scala test with : setUp(scn.inject(rampUsers(5000) over (3600 seconds)).protocols(httpConf)). But it’s not what i want. What I want is : 0 user connected at first and 5000 at the end which execute the scenario. Is it possible? I tried to use (nbUsers) into(injectionStep) separatedBy(dur unit) but it seems there is an error. Is it possible with Gatling?

LEDUNOIS Simon

---

<div class="post-metadata">

**Author:** ![empty\_account](https://avatars.discourse-cdn.com/v4/letter/e/74df32/32.png) [@empty\_account](https://community.gatling.io/u/empty_account)\
**Post date:** [March 31, 2015, 9:44am UTC](https://community.gatling.io/t/0-to-5000-users/2164/2 "2015-03-31T09:44:37Z")

</div>

rampUsersPerSec(0) to 5000 during(60 minutes)

---

<div class="post-metadata">

**Author:** ![Simon\_LEDUNOIS](https://avatars.discourse-cdn.com/v4/letter/s/59ef9b/32.png) [@Simon\_LEDUNOIS](https://community.gatling.io/u/Simon_LEDUNOIS)\
**Post date:** [March 31, 2015, 10:00am UTC](https://community.gatling.io/t/0-to-5000-users/2164/3 "2015-03-31T10:00:51Z")

</div>

I’m sorry, but when it compile, there is an error occured by 0 UsersPerSec

Exception in thread “main” java.lang.IllegalArgumentException: requirement faile  
d: injection rates must be strictly positive values  
at scala.Predef$.require(Predef.scala:219)  
at io.gatling.core.controller.inject.RampRateInjection.(InjectionS  
tep.scala:85)  
at io.gatling.core.controller.inject.InjectionSupport$RampRateBuilder.du  
ring(InjectionSupport.scala:35)  
at computerdatabase.Applications.(Applications.scala:61)  
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou  
rce)  
at java.lang.reflect.Constructor.newInstance(Unknown Source)  
at java.lang.Class.newInstance(Unknown Source)  
at io.gatling.core.runner.Runner.run(Runner.scala:36)  
at io.gatling.app.Gatling$$anonfun$runSimulationIfNecessary$1.apply(Gatl  
ing.scala:132)  
at io.gatling.app.Gatling$$anonfun$runSimulationIfNecessary$1.apply(Gatl  
ing.scala:117)  
at scala.Option.getOrElse(Option.scala:121)  
at io.gatling.app.Gatling.runSimulationIfNecessary(Gatling.scala:117)  
at io.gatling.app.Gatling.start(Gatling.scala:73)  
at io.gatling.app.Gatling$.fromArgs(Gatling.scala:59)  
at io.gatling.app.Gatling$.main(Gatling.scala:44)  
at io.gatling.app.Gatling.main(Gatling.scala)

And when i replace 0 by 1, i get : waiting:9001800 / active : 0 / done 0

What I would like to do is :

1. At start : waiting : 5000 / active : 0 / done : 0
2. At 30 min : waiting 2500 / active : 2500 / done : 0
3. At 60 min : waiting 0 / active : 5000 / done : 0

---

<div class="post-metadata">

**Author:** ![empty\_account](https://avatars.discourse-cdn.com/v4/letter/e/74df32/32.png) [@empty\_account](https://community.gatling.io/u/empty_account)\
**Post date:** [March 31, 2015, 10:25am UTC](https://community.gatling.io/t/0-to-5000-users/2164/4 "2015-03-31T10:25:53Z")

</div>

> there is an error occured by 0 UsersPerSec

Yes, sounds sensible to start off on positive integers.

Could you send me your script please?

---

<div class="post-metadata">

**Author:** ![empty\_account](https://avatars.discourse-cdn.com/v4/letter/e/74df32/32.png) [@empty\_account](https://community.gatling.io/u/empty_account)\
**Post date:** [March 31, 2015, 10:57am UTC](https://community.gatling.io/t/0-to-5000-users/2164/5 "2015-03-31T10:57:08Z")

</div>

Are you running the tests through a company proxy?

---

<div class="post-metadata">

**Author:** ![Simon\_LEDUNOIS](https://avatars.discourse-cdn.com/v4/letter/s/59ef9b/32.png) [@Simon\_LEDUNOIS](https://community.gatling.io/u/Simon_LEDUNOIS)\
**Post date:** [March 31, 2015, 11:22am UTC](https://community.gatling.io/t/0-to-5000-users/2164/6 "2015-03-31T11:22:13Z")

</div>

My scipt :

`

package computerdatabase

import io.gatling.core.Predef.\_  
import io.gatling.http.Predef.\_  
import scala.concurrent.duration.\_

class Applications extends Simulation {

val httpConf = http  
.baseURL("") // Here is the root for all relative URLs  
.acceptHeader(“text/html,application/xhtml+xml,application/xml;q=0.9,_/_;q=0.8”) // Here are the common headers  
.doNotTrackHeader(“1”)  
.acceptLanguageHeader(“en-US,en;q=0.5”)  
.acceptEncodingHeader(“gzip, deflate”)  
.userAgentHeader(“Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.89 Safari/537.36”)

val headers\_10 = Map(“Content-Type” → “”“application/x-www-form-urlencoded”"") // Note the headers specific to a given request

val scn = scenario(“Adams”) // A scenario is a chain of requests and pauses  
.exec(http(“connexion”)  
.post("/auth/login")  
.headers(headers\_10)  
.formParam(""“email”"", “”“login”"") // Note the triple double quotes: used in Scala for protecting a whole chain of characters (no need for backslash)  
.formParam(""“password”"", “”“azerty123"”")  
.formParam(""“callBack”"", “”""""))  
.pause(5) // Note that Gatling has recorded real time pauses  
.exec(http(“Wiki”)  
.get("/wiki"))  
.pause(5)  
.exec(http(“Mes Applis”)  
.get("/welcome"))  
.pause(5)  
.exec(http(“actualiteslités”)  
.get("/actualites"))  
.pause(5)  
.exec(http(“Mes Applis”)  
.get("/welcome"))  
.pause(5)  
.exec(http(“Export”)  
.get("/archive"))  
.pause(5)  
.exec(http(“Mes Applis”)  
.get("/welcome"))  
.pause(5)  
.exec(http(“Espace documentaire”)  
.get("/workspace/workspace"))  
.pause(5)  
.exec(http(“Mes Applis”)  
.get("/welcome"))  
.pause(5)  
.exec(http(“Forum”)  
.get("/forum"))  
.pause(5)  
.exec(http(“Mes Applis”)  
.get("/welcome"))  
.pause(5)  
.exec(http(“Gestion de ressources”)  
.get("/rbs"))  
.pause(5)  
setUp(scn.inject(rampUsersPerSec(1) to 5000 during(60 minutes)).protocols(httpConf))

}

`

There is no proxy for my tests

---

<div class="post-metadata">

**Author:** ![empty\_account](https://avatars.discourse-cdn.com/v4/letter/e/74df32/32.png) [@empty\_account](https://community.gatling.io/u/empty_account)\
**Post date:** [March 31, 2015, 11:31am UTC](https://community.gatling.io/t/0-to-5000-users/2164/7 "2015-03-31T11:31:42Z")

</div>

Is this site open? Can you give me the base URL?

---

<div class="post-metadata">

**Author:** ![Simon\_LEDUNOIS](https://avatars.discourse-cdn.com/v4/letter/s/59ef9b/32.png) [@Simon\_LEDUNOIS](https://community.gatling.io/u/Simon_LEDUNOIS)\
**Post date:** [March 31, 2015, 11:36am UTC](https://community.gatling.io/t/0-to-5000-users/2164/8 "2015-03-31T11:36:44Z")

</div>

No. It’s in internal server

---

<div class="post-metadata">

**Author:** ![Simon\_LEDUNOIS](https://avatars.discourse-cdn.com/v4/letter/s/59ef9b/32.png) [@Simon\_LEDUNOIS](https://community.gatling.io/u/Simon_LEDUNOIS)\
**Post date:** [March 31, 2015, 11:58am UTC](https://community.gatling.io/t/0-to-5000-users/2164/9 "2015-03-31T11:58:42Z")

</div>

The main issue is when I execute  
`  
rampUsers(5000) over (3600 seconds)

`  
I get a constant 64 user on my App and not a scale to 5000 in 3600 sec.
