Gatling gradle plugin is not able to start a simulation by its FQCN if filename is different

Steps to reproduce:

  1. git clone https://github.com/gatling/gatling-gradle-plugin-demo-kotlin

  2. Change class name ComputerDatabaseSimulation to ComputerDatabaseCheckSimulation but keep the file name src/gatling/kotlin/computerdatabase/ComputerDatabaseSimulation.kt

  3. Start the simulation by its new FQCN

Result: success but no simulation is executed:

./gradlew gatlingRun-computerdatabase.ComputerDatabaseCheckSimulation

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.6/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD SUCCESSFUL in 414ms
6 actionable tasks: 1 executed, 5 up-to-date

Expected result:
The simulation is executed, as it is, when the class name is the same as the file name.

Use Case:
I want to have several similar simulations which differ e.g. only by the injection properties but which execute the same scenario.
And I want to keep them in the same file to avoid having many files with only little differnces.
I would even like to define the simulation in inner classes of the class defining the scenario, which is also not possible at all currently.

How can I achive this with the gatling gradle plugin?

The next version of the plugin, to be released along with Gatling 3.11.0 (ETA ~1month) will have a breaking change where it will work based on class names instead of file names.

Hopefully, it will most likely make things work for your design.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.