Gatling IDE Integration


im trying to build and run the script inside eclipse, but unfortunately i got no simulation script found.

i changed IDEPathHelper to have my simulation folder.


object IDEPathHelper {

val gatlingConfUrl = getClass.getClassLoader.getResource(“recorder.conf”).getPath
val projectRootDir = File(gatlingConfUrl).parents(2)

val mavenSourcesDirectory = projectRootDir / “simulations”
val mavenResourcesDirectory = projectRootDir
val mavenTargetDirectory = projectRootDir / “target”
val mavenBinariesDirectory = mavenTargetDirectory / “test-classes”

val dataDirectory = mavenResourcesDirectory / “data”
val requestBodiesDirectory = mavenResourcesDirectory / “request-bodies”

val recorderOutputDirectory = mavenSourcesDirectory
val resultsDirectory = mavenTargetDirectory / “results”

val recorderConfigFile = (mavenResourcesDirectory / “recorder.conf”).toFile

and changed Engine.scala to pick it up

import io.gatling.core.config.GatlingPropertiesBuilder

object Engine extends App {

val props = new GatlingPropertiesBuilder
props.sourcesDirectory(IDEPathHelper.mavenSourcesDirectory.toString) // by default this line is not there.


my simulations folder is parallel to src folder (for some reason i cant change that). to run engine.scala, i always got this message: There is no simulation script. Please check that your scripts are in user-files/simulations.

if i put my simulations into /src/test/scala, engine.scala can pick it up.

Any ideas why it can’t use projectRootDir / “simulations” as the simulation folder?


Is your project a Scala project?
This IDE support assumes that your IDE compiles the scala classes for you. Is suspect your simulation folder is not a source one.

if i put the same simulation folder under src, engine.scala could find it and execute it.

not sure what you mean whether my project is a scala project. i created the project by maven → archetype project → mvn clean install. im using scala IDE from here:

everything works fine if i put simulation folder under src, but parallel to src doesnt work. and use this props.sourcesDirectory(IDEPathHelper.mavenSourcesDirectory.toString) to set source directory doesnt work. so engine.scala can only find recognize simulations under src folder?