The Gatling Maven plugin integrates Gatling’s load testing engine directly into your Maven build, letting you run simulations with a single command, automate them in CI pipelines, and package or deploy them to Gatling Enterprise Edition — without requiring the standalone bundle.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/gatling/gatling.io-doc/llms.txt
Use this file to discover all available pages before exploring further.
This documentation assumes you have Maven installed and uses the standard
mvn command format. If you prefer the Maven Wrapper, replace mvn with ./mvnw on Linux/macOS or mvnw.cmd on Windows.Versions
Check available versions on Maven Central. Milestone (M) versions are released exclusively for Gatling Enterprise Edition customers.
Setup
Add the following to yourpom.xml:
Configuration
The plugin supports many configuration options via the<configuration> block. For example, to pin a specific simulation class:
mvn gatling:help -Ddetail=true -Dgoal=test to print all available configuration options for any goal.
Running Your Simulations
Run all simulations with thetest goal:
gatling:test goal runs interactively and prompts you to choose a simulation unless:
- Only one simulation exists in the project
- The simulation class is forced via
-Dgatling.simulationClass=<FullyQualifiedClassName> - Maven batch mode (
-B) is active - The
CIenvironment variable is set totrue
Running the Recorder
Launch the Gatling Recorder to generate a simulation from browser traffic:Integrating with the Maven Lifecycle
Bind plugin goals to standard Maven lifecycle phases to trigger them automatically:By default,
test binds to the integration-test phase (triggered by mvn verify) and enterprisePackage binds to the package phase.Running Simulations on Gatling Enterprise Edition
Prerequisites
You need a Gatling Enterprise Edition API token with the Configure role on the expected teams. Store your token securely — never commit it to source control. The plugin reads it from:- The
GATLING_ENTERPRISE_API_TOKENenvironment variable - The
gatling.enterprise.apiTokenJava system property
pom.xml:
Deploying to Gatling Enterprise Edition
TheenterpriseDeploy goal creates or updates packages and simulations based on your project configuration:
.gatling/package.conf. To use a different filename:
Starting Simulations on Gatling Enterprise Edition
TheenterpriseStart goal deploys your package and launches the simulation in one step:
Wait for run completion
-Dgatling.enterprise.waitForRunEnd=true — Blocks until the run finishes and fails the build if assertions fail.Label your run
-Dgatling.enterprise.runTitle=<title> and -Dgatling.enterprise.runDescription=<description> add metadata to the run report.Packaging for Manual Upload
Generate a deployable JAR without triggering an automatic upload:target/<artifactId>-<version>-shaded.jar, which you can upload manually through the Gatling Enterprise Edition dashboard.
Private Packages
If you use private locations with a control plane, configure its URL inpom.xml:
Overriding Logback Configuration
Place alogback-test.xml in your resources folder to override the embedded logging configuration, or specify a custom path: