Hi, I’m new here and with Gatling, so sorry for any silly mistakes!
I’ve been running my project with Gatling 3.20 and Maven plugin 3.0.5 and decided to update both to 3.7.5 and 4.1.1 respectively. The thing is, after the update, I started to get this message:
[ERROR] Failed to execute goal io.gatling:gatling-maven-plugin:4.1.1:test (default-cli) on project MyProject.PerformanceTests : No simulations to run → [Help 1]
If I try to specfy a simulation using ‘-Dgatling.simulationClass=com.next.simulations.LoadTest’ I get the error:
i.g.a.Gatling$ - Run crashed java.lang.ClassNotFoundException: com.next.simulations.LoadTest
Currently I only updated the properties section like this:
Hi,
This would be because the Gatling Maven plugin no longer includes compilation for your Scala code (in part because Gatling can now support a choice of different languages, with java and Kotlin too). You’ll need to add the scala-maven-plugin to the <plugins> section in your POM; you can see an example configuration in the demo project.
I did the changes from the documentation and now locally I’m able to execute the tests. The problem now tranfered to Azure Devops, where the task to install maven is failing.
and now this is the current error in the pipeline is:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project MyProject.PerformanceTests: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test failed: The forked VM terminated without saying properly goodbye. VM crash or System.exit called ? -> [Help 1]
it basically fail when trying to execute some tests (???)
Sorry the spam, just want to share the resolution, but adding the maven-surefire-plugin with the latest version fixed maven installation and gatling tests are running
Make sure that your Simulation classes don’t match surefire’s tests naming convention or it will think those are unit tests it must run and will likely fail to do so.