javaspring-bootgatlingmaven-gatling-plugin

Misunderstanding with the installation gatling 3.14.3


According to this instruction https://docs.gatling.io/tutorials/oss/ i try to install Gatling to my project. I have a Spring Boot 3.5.3 and i added latest gatling as maven dependencies

<plugin>
<groupId>io.gatling</groupId>
<artifactId>gatling-maven-plugin</artifactId>
<version>4.19.1</version>
</plugin>

<dependencies>
<dependency>
  <groupId>io.gatling.highcharts</groupId>
  <artifactId>gatling-charts-highcharts</artifactId>
  <version>3.14.3</version>
  <scope>test</scope>
</dependency>
</dependencies>

When i run command ./mvnw clean gatling:test the project crashed and as far as i understand thats because of version conflict Netty.

Next step i try to run gatling as independent java application.

On this page https://docs.gatling.io/tutorials/oss/ i downloaded two archive

  1. Install Gatling using a ZIP file for build tools#

    Download Gatling for Maven-Java (gatling-maven-plugin-demo-java-main.zip)

  2. Use the standalone bundle#

    Download for Gatling bundle (gatling-charts-highcharts-bundle-3.14.3-bundle.zip)

I extract and investigate this two archive and they absolutely the same. What sens to create two similar link ?

The next two commands:

    cd gatling-maven-plugin-demo-java-main
    ./mvnw clean gatling:test

The project finished successfully and test BasicSimulation.java passed. My custom gatling test located in my spring boot application. Is it possible to specify with an argument where my tests are located? Otherwise I will be forced to copy and paste test from my-spring-boot-app/test directory to gatling-maven-plugin-demo-java-main . Something like:

./mvnw clean gatling:test -- test-location= /path/to/my/tests/files

Is it possible to configure Gatling and make it as a global command line command ? Correct me if i do or understand something wrong.


Solution

  • This question was double posted on the Gatling community forum and answered there.

    In short:

    As much as possible, don't mix the classpath our your Java application and the one of your Gatling tests so you don't end up with dependency versions conflicts (here, Netty, also pulled by Spring boot.

    You can of course store your Gatling tests in the same repository as you application so you have one shared version, but just don't make them into one single compilation unit: