Shifting performance testing left means running load tests automatically on every pull request or deployment — not just before a release. GitHub Actions makes it straightforward to trigger a Gatling Enterprise simulation, block on the results, and fail the workflow if your defined assertions are not met. This guide walks through the full setup: creating a scenario, deploying it to Gatling Enterprise Edition, and wiring it into a GitHub Actions workflow.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.
Triggering simulations from GitHub Actions requires a Gatling Enterprise Edition account. Explore plans if you don’t have one yet.
Prerequisites
- Gatling version 3.13 or higher
- A Gatling Enterprise Edition account
- The sample project cloned from gatling/devrel-projects — navigate to
articles/githubintegration
Step 1: Write the Simulation
Create a scenario that exercises your target application. The example below uses the JavaScript SDK to simulate users loading an e-commerce homepage.global().successfulRequests().percent().gt(90.0) — causes the workflow to fail if fewer than 90% of requests succeed.
Step 2: Deploy to Gatling Enterprise Edition
Before GitHub Actions can trigger a simulation, you must package and upload it to Gatling Enterprise Edition.Generate an API token
In the Gatling Enterprise UI, go to API Tokens and create a token with the Configure permission. Keep it safe.
Set the token in your build tool
Export the token as
GATLING_ENTERPRISE_API_TOKEN in your local shell, then run the deploy command:Create a simulation in the UI
In Simulations, click Create New, select your uploaded package, configure locations and load generator sizes, then save.
Step 3: Add the API Token to GitHub Secrets
Step 4: Create the GitHub Actions Workflow
Add a workflow file at.github/workflows/load-test.yml. The example below prompts for a simulation ID via workflow_dispatch inputs, making it easy to run on demand or from a CI event.
Workflow Inputs and Action Parameters
| Parameter | Description |
|---|---|
api_token | Gatling Enterprise API token (use a GitHub secret) |
simulation_id | The simulation ID from Gatling Enterprise |
title | Optional display name for this run |
description | Optional description for this run |
extra_system_properties | Optional JSON object of additional Java system properties (e.g. {"key": "value"}) |
extra_environment_variables | Optional JSON object of additional environment variables merged into the simulation |
fail_action_on_run_failure | Set to false to not fail the workflow if the simulation itself fails (default: true) |
wait_for_run_end | Set to false to start the simulation and exit without waiting for it to finish (default: true) |
Step 5: Run the Workflow
Navigate to Actions
In your GitHub repository, click the Actions tab and select Gatling Load Test from the workflow list.
Monitor progress
GitHub Actions logs will stream the run status. A link to the Gatling Enterprise Edition live report is printed to the log as soon as the run starts.
What This Achieves
By integrating Gatling with GitHub Actions you:- Detect regressions automatically — a performance drop that breaks an assertion blocks the PR from merging.
- Capture historical data — every simulation run is stored in Gatling Enterprise Edition, enabling trend analysis and run comparisons.
- Keep tests close to code — the workflow YAML lives in the repository alongside the simulation, reviewed and versioned like any other code change.