How can I run the GatlingRunner.scala from maven command in my project?

Hi All,

I have Gatling project and there is a runner class I have made like this (in which I can mention the desired simulation class name to run e.g.AccountManagementSimulation.scala)

object GatlingRunner {

def main(args: Array[String]): Unit = {

// this is where you specify the class you want to run
val simClass = classOf[AccountManagementSimulation].getName

val props = new GatlingPropertiesBuilder



But I am unable to run this class from the maven. I tried some commands like mvn package exec:java -Dexec.mainClass=GatlingRunner but nothing happens.

Although if I specify simulation class directly like mvn gatling:test -Dgatling.simulationClass=dealflow.AccountManagementSimulation then it works.

I am using <gatling-plugin.version>3.0.3</gatling-plugin.version>

Please suggest.