Issues updating from 3.2.0 to 3.7.5

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:

<gatling.version>3.7.5</gatling.version>
<gatling-maven-plugin.version>4.1.1</gatling-maven-plugin.version>

Do I need to do anything else in any other file or even in the pom?

In case it helps, here’s the pom:

Again, sorry the silly question!

Thanks,
Icaro

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.

Please note this change is documented in the upgrade guide.

Hi Thanks for the replies!

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.

This is the ADO task:

- task: Maven@3
    displayName: 'Install Maven'
    inputs:
      mavenPomFile: '$(build.sourcesdirectory)/'

I also added this plugin (as I saw some comments regarding):

   <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-surefire-plugin</artifactId>
      <version>2.12.4</version>
    </plugin>

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 (???)

Any advice on that?

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 :slight_smile:

    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-surefire-plugin</artifactId>
      <version>3.0.0-M5</version>
    </plugin>

Sorry again!

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.