You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/hyperexecute-gattling-testing.md
+98-2Lines changed: 98 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,7 +54,26 @@ import TabItem from '@theme/TabItem';
54
54
></script>
55
55
Gatling is an open-source load and performance testing framework designed for testing web applications. It uses a powerful Scala-based DSL to define test scenarios and is capable of simulating thousands of concurrent users, making it ideal for stress and performance testing.
56
56
57
-
This guide provides a structured approach to integrating the Gatling performance testing framework with the LambdaTest HyperExecute platform
57
+
## 🚀 Why Choose HyperExecute for Gatling Performance Testing?
58
+
While Gatling is powerful on its own, running large-scale performance tests using traditional setups often introduces significant bottlenecks:
59
+
60
+
### ⚠️ Common Challenges with Traditional Runners
61
+
-**Infrastructure Limitations:** Tests run sequentially or on underpowered machines, leading to long execution times.
62
+
-**Manual Setup & Maintenance:** Developers must handle environment configuration, dependency resolution, and runtime orchestration manually.
63
+
-**Limited Scalability:** Scaling tests across multiple machines requires complex setup and resource coordination.
64
+
-**Debugging Overhead:** Analyzing failures or performance issues often involves sifting through scattered logs and inconsistent outputs.
65
+
66
+
### ✅ How HyperExecute Solves These Challenges
67
+
LambdaTest’s HyperExecute platform is purpose-built to streamline and supercharge your Gatling test execution:
68
+
69
+
-**⚡ Smart Test Distribution:** Automatically splits and runs tests across multiple machines for faster execution and optimal resource utilization.
70
+
-**🧪 Isolated, Reproducible Environments:** Each test job runs in its own isolated environment with managed dependencies for consistent results.
71
+
-**📊 Built-in Reporting & Artifact Management:** Uploads Gatling reports and logs as artifacts that can be easily accessed and analyzed post-run.
72
+
-**🔁 Built-in Retry & Stability Handling:** Supports automatic retries for failed scenarios to minimize false negatives and flakiness.
73
+
-**🔍 Deep Debugging Insights:** Rich logs, structured output, and centralized monitoring help you trace performance bottlenecks with ease.
74
+
75
+
### 🚀 Result: Scalable, Reliable, and Faster Gatling Test Cycles
76
+
By integrating Gatling with HyperExecute, you can move beyond traditional limitations and run large-scale load tests with speed, precision, and confidence. This guide provides a structured approach to integrating the Gatling performance testing framework with the LambdaTest HyperExecute platform.
58
77
59
78
## Prerequisites
60
79
To run the Tests on HyperExecute from your Local System, you are required:
@@ -84,6 +103,75 @@ Download the HyperExecute CLI and copy it into the root folder of the downloaded
The core of HyperExecute configuration lies in the `hyperexecute.yaml` file. Let’s understand how it is constructed — step by step:
107
+
108
+
#### 1. Define Test Environment and Execution Strategy
109
+
The first step is to define the environment your tests will run on using the runson parameter. You can also configure intelligent parallelization and test exit conditions.
110
+
111
+
```yaml
112
+
version: 0.1
113
+
runson: linux # OS to run the tests (e.g., linux, win)
114
+
autosplit: true
115
+
concurrency: 1# Defines the number of test sessions to run concurrently
116
+
scenarioCommandStatusOnly: true
117
+
```
118
+
119
+
#### 2. Dependency Resolution with Maven
120
+
Before running the actual performance test, ensure all project dependencies are resolved locally for a reproducible build. This step pulls all required Maven dependencies to a local directory (.m2), ensuring environment consistency.
121
+
122
+
```yaml
123
+
pre:
124
+
- mvn -Dmaven.repo.local=./.m2 dependency:resolve
125
+
```
126
+
127
+
#### 3. Configure Test Discovery (Optional)
128
+
Test discovery determines what files or test suites should be run. You can customize this to dynamically scan simulation classes.
129
+
130
+
```yaml
131
+
testDiscovery:
132
+
type: raw
133
+
mode: static
134
+
command: echo "Test"
135
+
```
136
+
The `command` is a placeholder here. In advanced setups, you can provide a script to programmatically discover test files.
137
+
138
+
#### 4. Configure the Test Execution Command
139
+
Specify the command that runs your Gatling tests via Maven:
140
+
141
+
```yaml
142
+
testRunnerCommand: mvn gatling:test
143
+
```
144
+
145
+
#### 5. Add Background Services (Optional)
146
+
If your test depends on a backend server or application under test, you can spin it up in the background:
When `autosplit` is enabled, this command can be intelligently distributed across runners.
154
+
155
+
#### 6. Upload Test Reports
156
+
Once the test completes, use uploadArtefacts to store Gatling reports:
157
+
158
+
```yaml
159
+
uploadArtefacts:
160
+
- name: TestReport
161
+
path:
162
+
- target/gatling/**
163
+
```
164
+
165
+
These will be visible in the HyperExecute logs UI after the run.
166
+
167
+
#### 7. Add Retry Logic (Optional)
168
+
You can automatically retry failed tests to avoid flakiness.
169
+
170
+
```yaml
171
+
retryOnFailure: true
172
+
maxRetries: 1
173
+
```
174
+
87
175
Here is a complete working YAML configuration that runs Gatling performance tests on linux runners via HyperExecute:
88
176
89
177
```yaml reference title="hyperexecute.yaml"
@@ -103,4 +191,12 @@ From the project root directory, execute the below CLI command in your terminal:
103
191
104
192
> **NOTE :** In case of macOS, if you get a permission denied warning while executing CLI, simply run **`chmod u+x ./hyperexecute`** to allow permission. In case you get a security popup, allow it from your **System Preferences** → **Security & Privacy** → **General tab**.
0 commit comments