Gatling Recorder

A guide on for using Gatling Recorder, and creating&running a basic Gatling test

Recording a Script

To start Gatling Recorder, open the terminal on your computer and navigate to Gatling's bin directory using “cd” command.

  • If you’re on windows you’ll need to run: recorder.bat

  • On the macOS or Linux Based OS you need to execute: Sh ./

loadium@localhost:~ erdem$ cd ~
loadium@localhost:~ erdem$ cd Downloads/
loadium@localhost:Downloads erdem$ cd gatling-charts-highcharts-bundle-3.5.1
loadium@localhost:gatling-charts-highcharts-bundle-3.5.1 erdem$ cd bin/
loadium@localhost:bin erdem$ Sh ./
GATLING_HOME is set to /Users/erdem/Downloads/gatling-charts-highcharts-bundle-3.5.1

Using .HAR File

In order to record a .HAR file you need to open the Chrome developer tools, Navigate to Network Section and start recording.

After that you can right click and choose the "Save All As Har with Content". This should generate a .HAR file to use with Gatling.

Keep in mind: Loadium also supports HAR files and it can convert your HAR files to JMX and run your tests with provided HAR File.

Gatling Recorder can convert your HAR files easily to Scala you can simply switch the recorder mode to HAR Converter and select the HAR file. When you click to start it’ll convert your HAR Gatling Compatible Scala Test.

HTTP(S) Proxy Recorder

In order to record your first script you need to import your CA to your browser, after that you can use the proxy recording with Gatling.

Oops! Here comes the error. When we tried to exporting the CA from Gatling Recorder we welcomed by a roadblock. Even if we tried to Generate CA button on the Recorder it didn’t generated anything.

Here comes the thinking…

What we are gonna do?

How to Generate Certificate Authority For Gatling Recorder Proxy?

It’s as simple as writing 2 liner code, in fact literally two line code!

  • Open the terminal on macOS or Linux Machine and type the following codes and hit enter

openssl genrsa -des3 -out rootCA.key 4096
openssl req -x509 -new -nodes -key rootCA.key -sha256 -days 1024 -out rootCA.crt

There should be two files created such as rootCa.key and rootCA.crt

  • Import the .crt file to your browser and change your proxy settings to localhost:8000

  • Select the HTTP mode as Certificate Authority. Use the rootCA.crt file for CA Certificate and rootCA.key for CA Private Key.

Click the start and you’re ready to go.

Running the Test

Open the terminal on your computer and navigate to bin directory using “cd” command.

  • If you’re on windows you’ll need to run: gatling.bat

  • On the macOS or Linux Based OS you need to execute: sh ./

As you see you’ll see the recorded script and the demo scripts every script has its own number you can simply enter 0 and Gatling will begin testing.

Automatically Generated Reporting

When test complete you’ll see results as shown above. In the last line you’ll notice a local url you can find your dashboard report using that url and the dashboard report is look like this:

Enjoy Gatling test!

If you don't see the answer to your question here, please reach out to us to let us know! We're always improving our documentation.

Last updated