I'm integration a spring boot application and gatling, in order to provide a web ui to users and dynamically change execution params like simulation duration, users and the scala script to execute.
All simulation scripts have a feeder, a csv feeder. When first execution is done everithing works fine, but on second execution the message InjectionStopped expectedCount=1400 is shown and nothing else happened.
I'm execution Gatling by pasing properties builder like this:
val props = new GatlingPropertiesBuilder
props.binariesDirectory("./target/scala-2.10/classes")
props.dataDirectory("resources/data")
props.noReports()
props.resultsDirectory("/tmp/gatling-results")
props.simulationClass(script)
Gatling.fromMap(props.build)
Where script is provided by user.
Inside scala script, I created feeder in this way:
var csvFeeder = csv("userdata-" + env + ".csv").random
Then it is injected onto scenario:
val scn = scenario(scenarioName)
.during(testTimeSecs) {
feed(csvFeeder)
.exec(request)
.pause(minWaitMs, maxWaitMs)
...
As I mentioned when it is executed first time, it works fine, but on next executions message above is displayed and nothing else happened.