How to run a single simulation via maven in gatling 3.0.0

Hi All,

I am migrating from gatling 2.. to 3.0.0. I am using maven to build and run the simulations.

In gatling 2.., I used to specify mvn gatling:execute -Dgatling.simulation=[fullyQualifiedSimulationClassName]
In gatling 3.0.0, I am aware of that we have to use mvn gatling:test as the goal. The stuff that I couldn’t find is how to run a single simulation class via maven.

Is anyone aware of the above?

Thanks,
Ankit

Not sure, but you might be looking for:
-Dgatling.simulationClass=[fullyQualifiedSimulationClassName] rather than -Dgatling.simulation= as you stated above.

If thats not the solution, I see an article here that looks like it might work for you:
https://www.testingexcellence.com/performance-testing-gatling-maven-scala/

-Jon

Thanks Jon for replying.

In both the cases, I am getting this exception.

java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at io.gatling.mojo.MainWithArgsInFile.runMain(MainWithArgsInFile.java:50)
at io.gatling.mojo.MainWithArgsInFile.main(MainWithArgsInFile.java:33)
Caused by: java.lang.NoSuchMethodError: scala.Product.$init$(Lscala/Product;)V
at io.gatling.core.cli.CommandLineConstant.(CommandLineConstant.scala:19)
at io.gatling.app.cli.CommandLineConstants$.(CommandLineConstants.scala:22)
at io.gatling.app.cli.CommandLineConstants$.(CommandLineConstants.scala)
at io.gatling.app.cli.ArgsParser$$anon$1.(ArgsParser.scala:30)
at io.gatling.app.cli.ArgsParser.(ArgsParser.scala:28)
at io.gatling.app.Gatling$.fromArgs(Gatling.scala:46)
at io.gatling.app.Gatling$.main(Gatling.scala:39)
at io.gatling.app.Gatling.main(Gatling.scala)
… 6 more

that sounds to me like you need to fix an import at the top of your simulation script. OR the error looks like a method your using has changed. just guessing…