0 to 5000 Users

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?


rampUsersPerSec(0) to 5000 during(60 minutes)

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
at io.gatling.core.controller.inject.InjectionSupport$RampRateBuilder.du
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
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
at io.gatling.app.Gatling$$anonfun$runSimulationIfNecessary$1.apply(Gatl
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

there is an error occured by 0 UsersPerSec

Yes, sounds sensible to start off on positive integers.

Could you send me your script please?

Are you running the tests through a company proxy?

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
.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
.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(“Mes Applis”)
.exec(http(“Mes Applis”)
.exec(http(“Mes Applis”)
.exec(http(“Espace documentaire”)
.exec(http(“Mes Applis”)
.exec(http(“Mes Applis”)
.exec(http(“Gestion de ressources”)
setUp(scn.inject(rampUsersPerSec(1) to 5000 during(60 minutes)).protocols(httpConf))



There is no proxy for my tests

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

No. It’s in internal server

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.