0 to 5000 Users

90 views
Skip to first unread message

Simon LEDUNOIS

unread,
Mar 31, 2015, 5:27:13 AM3/31/15
to gat...@googlegroups.com
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

empty account

unread,
Mar 31, 2015, 5:44:39 AM3/31/15
to gat...@googlegroups.com
rampUsersPerSec(0) to 5000 during(60 minutes)

--
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.
For more options, visit https://groups.google.com/d/optout.

Simon LEDUNOIS

unread,
Mar 31, 2015, 6:00:51 AM3/31/15
to gat...@googlegroups.com
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.<init>(InjectionS
tep.scala:85)
        at io.gatling.core.controller.inject.InjectionSupport$RampRateBuilder.du
ring(InjectionSupport.scala:35)
        at computerdatabase.Applications.<init>(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

empty account

unread,
Mar 31, 2015, 6:26:00 AM3/31/15
to gat...@googlegroups.com
there is an error occured by 0 UsersPerSec 

Yes, sounds sensible to start off on positive integers.

Could you send me your script please? 


empty account

unread,
Mar 31, 2015, 6:57:17 AM3/31/15
to gat...@googlegroups.com
Are you running the tests through a company proxy?

Simon LEDUNOIS

unread,
Mar 31, 2015, 7:22:13 AM3/31/15
to gat...@googlegroups.com
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("<ip>") // 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""", """<ip>"""))
    .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

empty account

unread,
Mar 31, 2015, 7:31:52 AM3/31/15
to gat...@googlegroups.com
Is this site open? Can you give me the base URL?

Simon LEDUNOIS

unread,
Mar 31, 2015, 7:36:44 AM3/31/15
to gat...@googlegroups.com
No. It's in internal server

Simon LEDUNOIS

unread,
Mar 31, 2015, 7:58:42 AM3/31/15
to gat...@googlegroups.com
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.
Reply all
Reply to author
Forward
0 new messages