Basic Gatling load script with feeders

Examples on the usage of feeders in Gatling were a bit hard to find on the internet, so maybe someone will find my example helpful in one way or another. I’m no scala guru by any means, so feel free to improve the examples if you feel like it.

This example will run in basic stand-alone Gatling setup (gatling.sh) or through maven using the gatling-maven-plugin (mvn gatling:execute). We’re gonna construct a scala class in file BasicGatlingScenarioWithFeeders.scala. For this to work with gatling.sh the file should be placed in the standard-location ${GATLING_HOME}/user-files/simulations. For Maven, setup a standard maven project and put the file in src/test/scala. Create the directories bodies and data inĀ src/test/scala.

There is another option to run gatling through sbt, but for now that would only complicate things.

Let’s start by importing some Scala and Gatling stuff.

Continue reading