Updated: Introduction to Load Testing with Gatling

By | April 7, 2020
Gatling logo, used with permission.

Time passes more quickly that I thought and it has already been four years since I wrote the Introduction to Load Testing with Gatling article series. In preparation for another instance of the workshop, I had the opportunity to update the examples to the most recent version of Gatling and a newer Java version as well. The complete, updated, example is available in this GitHub repository.

The original articles have also been updated (or will be shortly) to reflect the changes in the example code. The articles can be found here:

Gatling Migration

For those curious about the amount of changes required to move from Gatling 2.3 to 3.3 there is a Gatling migration guide for version 2.3 to version 3.0 here. The main problem in my examples was the eighth example in part 4, in which I wanted to create an abstract base class that defined common properties for a group of Gatling load tests.

Changes to the Examples

Apart from the changes stipulated by the Gatling migration guide, I have made the following changes to the project:

  • Updated Java version to Java 11.
    Note that Gatling 3 only support 64-bit versions of OpenJDK 8 and 11, as per the documentation.
    Please ensure that you use an appropriate Java distribution and version!
  • Updated Gatling version from 2.3.0 to 3.3.1.
  • Updated Gatling Maven plugin from 2.2.4 to 3.0.5.

There are many other improvements to Gatling, some more visible and some more under-the-hood – please refer to the Gatling documentation in general and the migration guides in particular for additional details.

Note that the Gatling Maven plugin task has changed from execute to test. The first load simulation is thus run using this command:

mvn -Dgatling.simulation.name=HttpSimulation1 clean gatling:test

Happy coding!

Leave a Reply

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