Package generation

Generate a package from your Gatling bundle or with a Maven, sbt, or Gradle project.

Generating packages for Gatling Enterprise

Gatling Enterprise deploys packages containing your compiled simulations and resources. Those packages have to be generated upstream, using one of the methods below, before you can run them with Gatling Enterprise.

Gatling Enterprise is compatible with Gatling version from 3.5 to 3.14.9 included, however, these instructions are aligned with the new Maven-based bundle released in Gatling 3.11.

Maven, Gradle, sbt, or JavaScript/TypeScript project

To set up your project, and to learn how to use your preferred build tool to upload simulations to Gatling Enterprise Cloud, please refer to respective build tool plugin documentation:

Gatling bundle

Once you have created a simulation you want to upload, you can use the enterpriseDeploy command to upload your package and simulation with the default configuration. To customize your package and simulation configuration, see the Configuration as code documentation.

To use the enterpriseDeploy command:

  1. Create an API token in Gatling Enterprise.
  2. Set the API token in your local environment using either:
    • the GATLING_ENTERPRISE_API_TOKEN environment variable,
    • the gatling.enterprise.apiToken Java System property.
  3. Run the enterpriseDeploy command:
   
./mvnw gatling:enterpriseDeploy
mvnw.cmd gatling:enterpriseDeploy

Alternatively, you can package your simulation and then upload it using the Gatling Enterprise UI. To package and upload your simulation:

  1. Run the command enterprisePackage in your local terminal:

       
    ./mvnw gatling:enterprisePackage
    
    mvnw.cmd gatling:enterprisePackage
    
  2. Log in to Gatling Enterprise and go to the Packages page from the left-side navigation menu.

  3. Click + Create.

  4. Use the upload modal to name the package and assign it to a team.

  5. Upload the .jar file created in step 1 from your project’s target folder.

  6. Click Save.

Finally, you can get the list of all the available options with the help command:

   
./mvnw gatling:help
mvnw.cmd gatling:help

Note on feeders

A typical mistake with Gatling and Gatling Enterprise is to rely on having an exploded Maven/Gradle/sbt project structure, and to try to load files from the project filesystem.

This filesystem structure will not be accessible once your project has been packaged and deployed to Gatling Enterprise.

If your feeder files are packaged with your test sources, you must resolve them from the classpath. This will work both when you run simulations locally and when you deploy them to Gatling Enterprise.

// incorrect
val feeder = csv("src/test/resources/foo.csv")

// correct
val feeder = csv("foo.csv")

Edit this page on GitHub