Simulating more than one users - Gatling 2.0.1

1,024 views
Skip to first unread message

Daniel Hernandez

unread,
Oct 22, 2014, 11:43:07 AM10/22/14
to gat...@googlegroups.com
Hello,

I am trying to run a test with more than one request. 

I am following the site's directions (http://gatling.io/docs/1.5.6/user_documentation/tutorial/first_steps_with_gatling.html#first-steps-with-gatling) and adding the following to the simulation.scala '
scn.users(10).protocolConfig(httpConf)'but am getting the following error: 

value users is not a member of io.gatling.core.structure.ScenarioBuilder
10:37:36.971 [ERROR] i.g.a.ZincCompiler$ -     setUp(scn.users(10).protocols(httpProtocol))
10:37:36.972 [ERROR] i.g.a.ZincCompiler$ -               ^
10:37:36.981 [ERROR] i.g.a.ZincCompiler$ - one error found
Compilation failed

I see that the link corresponds to gatling 1.5.6.  Is there a new way to change this on 2.0.1?

Thank you for your time.

Pierre DAL-PRA

unread,
Oct 22, 2014, 11:46:24 AM10/22/14
to gat...@googlegroups.com
Hi Daniel, 

Maybe you should have a look at Gatling 2.0.1 documentation on that matter : http://gatling.io/docs/2.0.1/general/simulation_setup.html#injection .

Cheers,

Pierre

--
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.

Daniel Hernandez

unread,
Oct 22, 2014, 11:56:37 AM10/22/14
to gat...@googlegroups.com
Thank you Pierre.  I followed the link and copied and pasted the following below to the end of my simulation.scala file and am getting the following error:

Error:
not found: value httpConf
10:50:17.587 [ERROR] i.g.a.ZincCompiler$ -     ).protocols(httpConf)
10:50:17.587 [ERROR] i.g.a.ZincCompiler$ -                 ^
10:50:17.608 [ERROR] i.g.a.ZincCompiler$ - one error found
Compilation failed

Copied Text:
setUp(
  scn.inject(
    nothingFor(4 seconds), // 1
    atOnceUsers(10), // 2
    rampUsers(10) over(5 seconds), // 3
    constantUsersPerSec(20) during(15 seconds), // 4
    constantUsersPerSec(20) during(15 seconds) randomized, // 5
    rampUsersPerSec(10) to(20) during(10 minutes), // 6
    rampUsersPerSec(10) to(20) during(10 minutes) randomized, // 7
    splitUsers(1000) into(rampUsers(10) over(10 seconds)) separatedBy(10 seconds), // 8
    splitUsers(1000) into(rampUsers(10) over(10 seconds)) separatedBy(atOnceUsers(30)), // 9
    heavisideUsers(1000) over(20 seconds) // 10
    ).protocols(httpConf)
  )

What am I doing wrong?

Pierre DAL-PRA

unread,
Oct 22, 2014, 12:02:53 PM10/22/14
to gat...@googlegroups.com
It's because the val in which you defined your protocol is called httpProtocol in your simulation, and httpConf in the doc. Replace httpConf by httpProtocol and it will work.

But instead of simply copy/pasting the code examples, please read the documentation. You really dont need an injection profile that complicated.
It's only meant to showcase all the possibilites the injection DSL offers.

Daniel Hernandez

unread,
Oct 22, 2014, 4:41:14 PM10/22/14
to gat...@googlegroups.com
Thank you Pierre!  I understand.


Reply all
Reply to author
Forward
0 new messages