How to run a single simulation via maven in gatling 3.0.0

293 views
Skip to first unread message

ankit jasuja

unread,
Nov 5, 2018, 6:58:59 PM11/5/18
to Gatling User Group
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

Jon Thor Austen

unread,
Nov 5, 2018, 7:07:05 PM11/5/18
to Gatling User Group
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:

-Jon

ankit jasuja

unread,
Nov 5, 2018, 7:30:01 PM11/5/18
to Gatling User Group
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.<init>(CommandLineConstant.scala:19)
at io.gatling.app.cli.CommandLineConstants$.<init>(CommandLineConstants.scala:22)
at io.gatling.app.cli.CommandLineConstants$.<clinit>(CommandLineConstants.scala)
at io.gatling.app.cli.ArgsParser$$anon$1.<init>(ArgsParser.scala:30)
at io.gatling.app.cli.ArgsParser.<init>(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

Jon Thor Austen

unread,
Nov 5, 2018, 8:07:43 PM11/5/18
to gat...@googlegroups.com
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...



--
You received this message because you are subscribed to the Google Groups "Gatling User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gatling+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages