Hi Stephane Landelle / Team
I upgraded my Gatling and Maven to the latest version below are the snippet.
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<!-- <scala.version>2.12.7</scala.version> -->
<encoding>UTF-8</encoding>
<gatling.version>3.7.4</gatling.version>
<gatling-plugin.version>4.1.1</gatling-plugin.version>
<maven-jar-plugin.version>3.2.0</maven-jar-plugin.version>
<scala-maven-plugin.version>4.5.6</scala-maven-plugin.version>
</properties>
But when triggering the mvn command from IDE, its failing to find the Classes
mvn command -- ./mvnw clean gatling:test -Dgatling.simulationClass=com.sampleproject.ProjectStoreSimulation
[ERROR] i.g.a.Gatling$ - Run crashed
java.lang.ClassNotFoundException: com.sampleproject.ProjectStoreSimulation
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
....
...
Wrapped by: java.lang.IllegalArgumentException: User defined Simulation class com.sampleproject.ProjectStoreSimulation could not be loaded
at io.gatling.app.Selection$Selector.findUserDefinedSimulationInClassloader$1(Selection.scala:87)
at io.gatling.app.Selection$Selector.$anonfun$singleSimulationFromConfig$4(Selection.scala:91)
...
...
...
Caused by: java.lang.IllegalArgumentException: User defined Simulation class com.sampleproject.ProjectStoreSimulation could not be loaded
at io.gatling.app.Selection$Selector.findUserDefinedSimulationInClassloader$1(Selection.scala:87)
at io.gatling.app.Selection$Selector.$anonfun$singleSimulationFromConfig$4(Selection.scala:91)
at scala.Option.orElse(Option.scala:477)
Caused by: java.lang.ClassNotFoundException: com.sampleproject.ProjectStoreSimulation
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
[ERROR] Failed to execute goal io.gatling:gatling-maven-plugin:4.1.1:test (default-cli) on project upgrade-store-test: Gatling failed. Process exited with an error: 255 (Exit value: 255) -> [Help 1]
But when I run the Engine directly the script executes perfectly it only fails with MVN command.
--Alex Michael Raj J