class SimulationAllScenarios extends Simulation {
var conf = ConfigFactory.load()
var environment: String = System.getProperty("env")
environment = environment.toLowerCase()
var baseUrl = conf.getString(environment.concat(".baseUrl"))
var scenarioConf = ConfigFactory.load("scenarioProperties.conf")
val httpsProtocol = http.baseURL(baseUrl).disableFollowRedirect
setUp(PageOneScenario.scn.inject(ramp(scenarioConf.getInt("PageOne.Users")) over (scenarioConf.getInt("PageOne.RampUpTime"))),
PageTwoScenario.scn.inject(ramp(scenarioConf.getInt("PageTwo.Users")) over (scenarioConf.getInt("PageTwo.RampUpTime")))
PageThreeScenario.scn.inject(ramp(scenarioConf.getInt("PageThree.Users")) over (scenarioConf.getInt("PageThree.RampUpTime")))
)
.protocols(httpsProtocol)
}
--
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.
class userSimulation extends Simulation {
def getOption(a:String,b:String):String = { Option(System.getProperty(a)).getOrElse(b) }
val server = getOption("server","default")
val tests = getOption("tests","default")
val users = getOption("users","default").toInt
val time = getOption("time","default").toInt
val httpScenarios = Map (
"testOne" -> List(
scn1.inject(ramp(users user) over(time seconds))
),
"testTwo" -> List(
scn2.inject(ramp(users user) over(time seconds)),
scn3.inject(ramp(users user) over(time seconds))
)
)
val httpProtocol = http
.baseURL(server)
.disableFollowRedirect
setUp(httpScenarios(tests):_*).protocols(httpProtocol)
}
---
$ JAVA_OPTS='-Dserver=https://server.com -Dtest=testOne -Dusers=100 -Dtime=100' ${GATLING_HOME}/bin/gatling.sh -s userSimulation
no `: _*' annotation allowed here
(such annotations are only allowed in arguments to *-parameters)
val scns = httpScenarios(tests)
--
To unsubscribe from this group and stop receiving emails from it, send an email to gatling+unsubscribe@googlegroups.com.
This answer was for an older Gatling version. setUp now takes only one parameter: either an `Iterable` or a varargs. Concatenate your first nothingFor and your Params into one single Iterable.
--
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+unsubscribe@googlegroups.com.
.inject(
nothingFor((i-1) * (pRampTime+pStepTime) seconds),
rampUsers(pVusers) over (pRampTime seconds),
nothingFor(pStepTime seconds))
setUp(ionStepParams:_*, pomStepParams:_*)
To unsubscribe from this group and stop receiving emails from it, send an email to gatling+u...@googlegroups.com.
setUp(ionStepParams:_*, pomStepParams:_*)So if setUp(ionStepParams:_*) works, the above should also work.
Thanks for the second link. That cleared the my doubts. Have a good day.
var j = 0 var k = 0 val Params = 1 to pNumSteps map { i => { if(i%2==0){ k = k + 1 workloadType1(k, pPacing, ((pNumSteps - k + 3) * (pRampTime+pStepTime))) .inject( nothingFor((k-1) * (pRampTime+pStepTime) seconds),
rampUsers(pVusers) over (pRampTime seconds), nothingFor(pStepTime seconds)) }
else { j = j + 1 workloadType2(j, pPacing, ((pNumSteps - j + 3) * (pRampTime+pStepTime))) .inject( nothingFor((j-1) * (pRampTime+pStepTime) seconds),
rampUsers(pVusers) over (pRampTime seconds), nothingFor(pStepTime seconds)) } } }