Gatling 2.0.0 SNAPSHOT - execution issues

Hello All,

I’m new to Gatling tool usage. I have recently installed Gatling 2.0.0 Snapshot on Mac 64-bit.

I’m experiencing syntax errors, on trying to run following code listed in Gatling wiki.

setUp(scn.inject(nothingFor(4 seconds),
                 atOnce(10 users),
                 ramp(10 users) over (5 seconds),
                 constantRate(20 usersPerSec) during (15 seconds),
                 rampRate(10 usersPerSec) to(20 usersPerSec) during(10 minutes),
                 split(1000 users).into(ramp(10 users) over (10 seconds))
                                  .separatedBy(10 seconds),
                 split(1000 users).into(ramp(10 users) over (10 seconds))
                                  .separatedBy(atOnce(30 users)))
                 .protocols(httpConf)

It seems these api changed, for e.g.:

atOnce(10 users) => atOnceUsers(10)

ramp(10 users) => rampUsers(10)

I’m still having issues with following error.

Simulation.scala:41: not found: value constantRate

17:59:18.035 [ERROR] i.g.a.ZincCompiler$ - constantRate(20 usersPerSec) during (15 seconds),

could you please point me to correct documentation for Gatling2.0.0-Snapshot.

kindly advise if I need to any other version.

Thanks & Regards,

Raj

List of new methods. You want constantUsersPerSec(20) during(15)

Hello, I am also using Gatling 2.0.0 Snapshot on a 64-bit Mac but getting a different compilation error.
In my code, I am trying to use rampUsers to submit a POST request.

Is this by design, or is it a bug?

thanks

code>

39)setUp(
40) scn.inject(
41) rampUsers(10) over (30 seconds)
42) ).protocols(httpProtocol))

error>

10:35:29.138 [ERROR] i.g.a.ZincCompiler$ - /Users/nwhit8/volumes/secondary/libs/gatling/gatling-charts-highcharts-2.0.0-SNAPSHOT/user-files/simulations/com/nike/test/feed/CreatePostSimulation.scala:41: value seconds is not a member of Int

10:35:29.140 [ERROR] i.g.a.ZincCompiler$ - rampUsers(10) over (30 seconds)

Hi,

You’re missing an import.
Add :

import scala.concurrent.duration._

after the Gatling imports and your simulation will then compile.

Cheers,

Pierre

@Pierre - Thank you so much! As a newcomer to Scala and Gatling, this one had me scratching my head.

You’re welcome :slight_smile:
Please note that “seconds” is optional : if don’t specify any time unit, it defaults to seconds.