Run multiple Gatling simulations with Maven

comments 4
Dev

Gatling is nice load testing framework that uses Scala, Akka and Netty. It’s so much better than JMeter. It’s pretty easy to get started with scenarios written in a nice Scala DSL and it produces useful reports too. It also has a Maven plugin so you can incorporate continuous performance testing in your builds.

The trouble is if you list multiple scenarios in a simulation they will all run concurrently which is probably not what you want. You need to split your tests into separate Simulation classes and run them sequentially. The plugin documentation briefly describes a way of doing this using executions but the example is a little light.

Here’s a Maven profile that when activated will run your simulations sequentially. Execute the tests with mvn test -Pperformance.

4 Comments

  1. Matt Bramer says

    I know this is an older post, but for anyone who came here seeking clarity on the maven plugin, the following execution config in the plugin will result in sequential simulation runs, not concurrent.

    <configuration>
        <simulationsFolder>src/test/gatling</simulationsFolder>
        <runMultipleSimulations>true</runMultipleSimulations>
    </configuration>
    
  2. Sunil Gulabani says

    Getting exception while adding multiple simulation classes.

    “Gatling failed. More than 1 simulation to run, need to specify one”

  3. Michael Voase says

    Appreciate this is an old post…
    Does anyone have an idea how you would run multiple simulations but in a complete random order?

Leave a Reply

Your email address will not be published. Required fields are marked *