I'm trying to create a simulation where the scenarios executed and the injection profiles for them are passed in as a system property in the form of a JSON string.
Here's a gist of what I have so far.
I'm getting the following compile errors:
type mismatch;
found : io.gatling.core.controller.inject.RampInjection
required: Nothing
case "rampUsers" => rampUsers(stepArgs.getInt(0)) over(stepArgs.getInt(1))
^
type mismatch;
found : io.gatling.core.structure.PopulatedScenarioBuilder
required: Nothing
scnList(i) = scenarioNames(testCase.getString("case")).inject(injectStepList:_*)
^
Anyone have any ideas as to what's wrong/how to fix it? (Other comments/suggestions not related to the errors are also welcome.)
PS The format of the JSON looks like this:
[{'case':'ScenarioMapKey', 'inject':[{'type':'injectionStepType', 'args':[arg1(,arg2(,arg3)))]}]}]
Example:
[
{
'case': 'Login',
'inject': [
{
'type': 'nothingFor',
'args': [
5
]
},
{
'type': 'constantUsersPerSec',
'args': [
1,
10
]
}
]
},
{
'case': 'Register',
'inject': [
{
'type': 'atOnceUsers',
'args': [
3
]
}
]
}
]
Which should translate to:
setUp(LoginScenario.scn.inject(nothingFor(5), constantUsersPerSec(1) during(10)),
RegisterScenario.scn.inject(atOnceUsers(3))).protocols(httpConf)