Share this page

# Gatling tests

This topic describes how to use Gatling load testing scripts in performance tests.

In this topic:

## Gatling tests overview

Gatling is an open-source load and performance testing tool. Gatling is used for analyzing and measuring the performance of web servers and web applications. Gatling uses Scala programming language to create test scripts.

Performance tests support Gatling scripts with the .scala extension. You can run one or more Gatling scripts alongside other scripts in a performance test.

Gatling scripts have two significant features:

- Every Gatling script file contains all the necessary run settings within the script code.

- Gatling scripts contain a series of HTTP requests and pauses. Each request is reported as a transaction.

A Gatling script is triggered as a separate process on the computer, and is not controlled by OpenText Enterprise Performance Engineering.

Measurements can be viewed in online and offline graphs and in Analysis, using the data points from Gatling tests.

Back to top

## Prerequisite setup for Gatling tests

Note the following guidelines before creating a performance test with a Gatling script.

Area | Details
--- | ---
Operating system | Gatling scripts can be run on a load generator on a Windows or Linux operating system. The Docker installations of Windows and Linux also support Gatling scripts.
Embedded version | An embedded version of Gatling is included in the installation. No other installation or configuration is necessary. For supported versions of Gatling, see the Supported Protocols guide available from Support Matrix.
JDK | Make sure that you have 32-bit or 64-bit JDK 8 installed on the load generator machine (JDK 11 is not supported).

Tip: We recommend that you use dedicated load generator machines for running Gatling test scripts. Running tests from Controller, using the localhost load generator, may cause some instability.

Data files

Gatling scripts can reference data files, such as those that contain parameter values. These files can be in several formats, such as .csv, .ssv, .tsv, .json, and .xml.

If the Gatling script uses other files, make sure:

- it is in the same folder as the .scala file (and not a subfolder).

- the Gatling script correctly references the file.

The Controller finds these files, and sends them with the .scala file to the load generator for the test run.

Back to top

## Add Gatling scripts to a performance test

This task describes how to upload Gatling scripts to a test and configure runtime settings.

1. Prerequisites:

   - Make sure the load generator machines are set up to run Gatling tests, as described in Prerequisite setup for Gatling tests.

   - Create scripts in Gatling and save the scripts locally. The scripts must be saved in ZIP format and must include your .scala files and all other dependencies in the root folder of the ZIP file.

   - We recommend that you delete any old or unnecessary files from the scripts folder to avoid them being uploaded.

2. Upload Gatling scripts to OpenText Enterprise Performance Engineering.

   For details, see Upload a script.

   After uploading the script, it is added to the test management tree. You can view and edit most scripts directly from within the user interface. For details, see Edit a script.

3. Create a performance test, and assign the Gatling script to it.

   For details, see Tests.

4. If you need to specify a custom JDK path, or parameters, for example, if you want to change the behavior of the JVM, you need to configure the runtime settings.

   1. After you have uploaded a Gatling script and added it to a test, select the test in the test management tree and click Edit Test.

   2. In the Groups and Workload view, select a Vuser group and click the Edit Runtime Settings button .

   3. In the Gatling Runtime Settings dialog box, select:

      - Use default JDK path to use the default JDK installation to run Gatling tests. The path, registry, and Windows directory are searched to locate the JDK to be used.

      - Custom JDK path to use a custom JDK installation. Enter the path to the JDK folder and additional parameters to be passed to Java when the test starts.

      - To run Gatling simulations, enter the full name of the class to run in the Class name box. If you leave this out, the script run fails. If there are multiple Gatling scenarios in a simulation, the Controller only runs the first scenario.

5. Run the test.

   For details, see Manage a performance test run.

   Data points from Gatling tests are displayed in the graphs. For details, see View Gatling test results.

Back to top

## View Gatling test results

In your Gatling script, you can group a series of HTTP requests to be marked as a single transaction, and you can define the transaction name (see Transaction naming conventions). If you do not group the requests, then each HTTP request is reported as a transaction.

Every HTTP request in the Gatling script is reported as a transaction.

Gatling scripts produce results that are displayed in the following standard graphs:

- Running Vusers

- Transaction Response Time

- Hits per Second

- Total Transaction per second (Passed)

- Transactions per second (Passed)

- HTTP Responses per second

- Throughput - Whole Load Test

Customized graphs cannot be generated from Gatling script results.

For graph details, see Web resource monitor graphs, Runtime monitor graphs, and Transaction monitor graphs.

Back to top

## Notes and limitations

The following are notes and limitations when working with Gatling scripts.

- SLA transaction names are not listed.

- Gatling 3 syntax is not supported; only version 2.17 scripts are supported. To adapt scripts created in other versions, you may need to adjust several parameters such as keywords. For more information, see the relevant Gatling documentation.

- When running Gatling scripts, the compilation time (approximately 20-30 seconds) is included in the run duration. As a result, the actual time that Vusers run is shorter than the specified duration.

- OpenText Network Virtualization is not supported for Gatling tests.

Back to top

See also:

- Assets
- Tests

https://admhelp.microfocus.com Enterprise Performance Engineering,LoadRunner Enterprise 8942
Tips to improve your search results...OpenText™ Enterprise Performance Engineering Help Center OpenText™ Enterprise Performance Engineering Help 26.1 All View Local Help Center View Online Help Center Version: