Thursday, August 27, 2015

Gatling : How to download and install Gatling and its folder structure

In our previous posts we have discussed what is Gatling and the matters that we need to know to work with Gatling.

Here we will show how we can download and run Gatling.

Pre-Requisite :

Gatling requires JDK7 package (JDK7u6). It is recommended to install latest JDK. How to install Java on a windows machine can be found by previous post. So install JDK at first to start working.

Download :

Step 1 : Go the URL : http://gatling.io/#/download and click on the link “Gatling bundle (zip)”. Note that the latest release is now Gatling 2.1.7.

image

You can also use Maven to install Gatling. We will also discuss it on our future post.

There is no specific installer or exe file for Gatling. Only the bundles that needs to download and unzip.

Step 2 : After finishing download, unzip the zip file (gatling-charts-highcharts-bundle-2.1.7-bundle.zip).

Step 3 : Go to the “gatling-charts-highcharts-bundle-2.1.7-bundle” folder and inspect the following sub folders.

image

Folder structure :
Folder structure is as following:

bin : bin folder contains the launch file for Gatling and the Recorder.

There is a file named “recorder.bat” used for recording user scenario that is used for load testing in Gatling.

There is another file named “gatling.bat” used for starting the Gatling application and executing and generating load testing report.

image


conf folder : It contains the configuration files for Gatling, Akka and Logback. How to configure Gatling by modifying configuration file will be discussed on our later post.

image

lib : It contains the binaries used by Gatling. Basically it contains jar files.

image

results : It contains all reports that is generated as sub directory. Every sub directory is the report for a single load test.

image

Reports are generated as html format. It also generate simulation.log file that contains all the logs at the time of executing load test.

image

target : It contains all the test classes used in load testing.
user-files : This folder contains all the user scenarios. Use scenarios are recorded as a Scala file format and copied here. There are three sub directories.

image

Simulations : It contains all the user scenarios as Scala files. Scenarios are stored here as a specific folder structures that will be discussed on our later post.

data : It contains feeder files. We will discuss more on feeder files later.

bodies : It contains templates for request bodies.

Run the Recorder :

Step 1 : Go to the bin folder (in my case : C:\gatling-charts-highcharts-bundle-2.1.7\bin)

Step 2 : Double click on the “recorder.bat” file.

image

A command prompt window is displayed and then recorder window is displayed.

image

image

Run Gatling :

Step 1 : Go to the bin folder (in my case : C:\gatling-charts-highcharts-bundle-2.1.7\bin)

Step 2 : Double click on the “gatling.bat” file.

image

A command prompt window is displayed and then load testing instructions are displayed on the command prompt window.

image

How we can record user scenario and executing load testing using Gatling will be discussed on our next post. Until then…

Happy Load testing using Gatling!!!…

No comments:

Post a Comment

Cypress: How to handle browser-based authentication pop up dialog in Cypress

Five years ago I have written a blog on how to handle browser-based authentication for selenium webdriver.   Now it is for cypress. Cypress...