0

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.

Luis Rivera
  • 68
  • 2
  • 10
  • Which version of Gatling you are using? What do you mean with "next execution", next execution within `testTimeSecs` or next time when you run simulation? Btw. what are the values of your timing variables `minWaitMs`, `maxWaitMs` and `testTimeSecs`? – Teliatko Apr 21 '17 at 11:55
  • I'm using Gatling 2.2.3 and I'm refering next execution as the next time I run a simulation. I have set a minWaitMs and maxWaitMs between 1000 and 3000. – Luis Rivera Apr 21 '17 at 16:18

0 Answers0