📓
Loadium Wiki
  • Welcome to Loadium
  • Getting Started with Loadium
  • Quick Guides
    • Quick Start
    • JMeter Test
    • Locust Test
    • Script Builder
      • Simple HTTP Builder
      • Record&Play
    • Gatling Test
    • WebDriver Test
    • HLS Test
    • Understanding Test Reports
    • Test Execution Fail Reasons
    • File Output
  • ABOUT LOADIUM
    • Features
    • Pricing
    • VUH - Virtual User Hour
  • ACCOUNT
    • Profile & Account
    • Subscription
  • Features
    • Test Report
    • Compare Test
    • Private Location
    • Report PDF Export
  • Test Settings
    • Split CSV
    • Sandbox
    • Multi-Step
    • Geolocation
    • Customize Setup
    • Dedicated IP
    • Send Email
    • DNS Override
    • TPS
    • Network Type
    • Test Scheduling
    • Test Failure Settings
    • JMeter Settings
    • Failure Criteria
    • Flexible Thread Scheduling
  • CONTINUOUS INTEGRATION SUPPORT
    • Azure DevOps Pipeline
    • Jenkins Load Testing with Loadium
  • Integrations
    • Microsoft Teams Integration
    • New Relic Integration
    • AppDynamics Integration
    • TeamCity Integration
  • Jmeter Corner
    • Built-in JMeter Functions
    • How to Install JMeter Plugins
    • Record and Play Load Testing With Jmeter in 5 Steps
    • Websocket with Apache JMeter
    • JMeter Timers
    • Handling Error Messages of JMeter Tests in Loadium
    • Details of Throughput Controller in JMeter (Splitting Threads to Different Requests)
    • How to Add a Varying Number of Parameters in Apache JMeter
    • Local Network Simulation On JMeter
    • Running Load Test with FTP Server
  • Gatling Corner
    • Introduction to Gatling
    • Gatling Recorder
    • Gatling Pros&Cons
  • PUBLIC APIs
    • Get Test Status Service
    • Authentication Service
    • Get Performance Test List Service
    • Start Performance Test Service
Powered by GitBook
On this page
  • Recording a Script
  • Using .HAR File
  • HTTP(S) Proxy Recorder
  • Running the Test
  • Automatically Generated Reporting

Was this helpful?

  1. Gatling Corner

Gatling Recorder

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

PreviousIntroduction to GatlingNextGatling Pros&Cons

Last updated 3 years ago

Was this helpful?

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 ./recorder.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 ./recorder.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 ./gatling.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 to let us know! We're always improving our documentation.

Gatling Test
reach out to us
Uploading the certificate to Firefox browser