Problem with new sbt-plugin 3.2.0. Pass parameters don't work.

Hi, I updated the Gatling version to 3.4.0 and sbt plugin to 3.2.0 an I have a problem loading the environment configuration file. I use “com.typesafe” % “config” % "1.4.0 to pass param.

Part of the code to get conf_file.

For “gatling-sbt 3.2.0”:
When I run test like sbt -Dconfig=prod_application.con “gatling:testOnly simulations.test”
and print line from the code “CONFIG_FILE_PRINT”. I get “CONFIG_FILE_NAME: None” in terminal.
Moreover, when I run test with property noReports: sbt -Dgatling.charting.noReports=true “gatling:testOnly simulations.test”. report was generated. I expected only simulation.log and instead I have index.html. It looks like, with the new plugin, set properties don’t work.

When I set again to “gatling-sbt” to 3.1.0 in plugin.sbt file and I have Gatling in 3.4.0 version everything works fine and I get message CONFIG_FILE_NAME: Some(prod_application.con) in the terminal. And I can pass param to the test.

Please help me out because I don’t know if it’s bug or maybe I am doing something wrong. In older version of gatling and sbt-plugin everything worked fine and I have never got a problem to pass param.

Regards,
Daniel

sbt and java version

[info] welcome to sbt 1.3.13 (AdoptOpenJDK Java 1.8.0_265)
[info] loading settings for project gatling-performancetests-build from plugins.sbt …

Indeed, it looks like a regression. Thanks for reporting.
I guess the culprit is https://github.com/gatling/gatling-sbt-plugin/commit/0afb0a35c983b3ca29e0fa663309195f78716f93

Thanks for quick answer Stephane. Can I use gatling 3.4.0 with gatling-sbt 3.1.0 or better to get back to previous version of gatling?

You can use Gatling 3.4.0 with gatling-sbt 3.1.0, no need to rollback Gatling.

Could you please give gatling-sbt 3.2.1 a try?

Thanks for the quick fix. Problem solved.

Cool! Thanks for confirming!

Dear Gatling Team,

Im new to Gatling, while executing Base Simulation class from Gatlin bundle demo I’m having this issue from eclipse IDE. Please refer attached pom file

With Termianl its executing as and generating file. looking forward for your response.

Exception in thread “main” java.lang.NoClassDefFoundError: io/gatling/charts/component/impl/ComponentLibraryImpl

at io.gatling.charts.component.ComponentLibrary$.(ComponentLibrary.scala:44)

at io.gatling.charts.component.ComponentLibrary$.(ComponentLibrary.scala)

at io.gatling.charts.report.ReportsGenerator.generateFor(ReportsGenerator.scala:53)

at io.gatling.app.RunResultProcessor.generateReports(RunResultProcessor.scala:62)

at io.gatling.app.RunResultProcessor.processRunResult(RunResultProcessor.scala:40)

at io.gatling.app.Gatling$.start(Gatling.scala:88)

at io.gatling.app.Gatling$.fromMap(Gatling.scala:41)

at Engine$.delayedEndpoint$Engine$1(Engine.scala:11)

at Engine$delayedInit$body.apply(Engine.scala:4)

at scala.Function0.apply$mcV$sp(Function0.scala:34)

at scala.Function0.apply$mcV$sp$(Function0.scala:34)

at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)

at scala.App.$anonfun$main$1$adapted(App.scala:76)

at scala.collection.immutable.List.foreach(List.scala:389)

at scala.App.main(App.scala:76)

at scala.App.main$(App.scala:74)

at Engine$.main(Engine.scala:4)

at Engine.main(Engine.scala)

Caused by: java.lang.ClassNotFoundException: io.gatling.charts.component.impl.ComponentLibraryImpl

at java.net.URLClassLoader.findClass(URLClassLoader.java:382)

at java.lang.ClassLoader.loadClass(ClassLoader.java:418)

at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355)

at java.lang.ClassLoader.loadClass(ClassLoader.java:351)

pom file.rtf (3.79 KB)

Your pom is correct.

What most likely happens here is that maven corrupted the “gatling-charts-highcharts” library while downloading it so you end up with a corrupted jar in your local maven cache. Sadly, maven doesn’t verify artifacts checksums as part of its download process (I think gradle does).
You can verify this by trying to unzip the jar stored in your local maven cache. It’s located by default in ~/.m2/repository/io/gatling/gatling-charts-highcharts/3.3.1.
If so, remove the whole directory and try again so you trigger download again.

If it still doesn’t work, it might mean you’re using an Enterprise maven proxy (such as Nexus or Artifactory) and that the corrupted copy is stored upstream there. If so, you have to contact the administrators so they remove the corrupted file.