Gatling is an open source load testing tool for analyzing and measuring the performance of a variety of services, with a focus on web applications. It uses the actor model which consists in asynchronous parallel computing. The Actor implementation used in Gatling is Akka. In Gatling, scenarios are represented as easy-to-maintain scripts with a DSL (Domain Specific Language), written in Scala.
Key Features of Gatling:
- DSL for simulation to treat performance as a code
- Produces higher load by using an asynchronous non-blocking approach
- Full support of HTTP(S) protocols
- Supports input files CSV, TSV, SSV to access random data for data-driven tests.
- Generation of graphical reports using Graphite
Benefits of using Gatling:
- All reports and graphs are generated automatically in HTML after successful execution
- It is able to sustain high concurrent load with no obvious degradation in response times at 20K users
- It gives more accurate results with less memory and CPU usage
- It can run on any operating system
-Gatling architecture is divided into three parts
-Gatling Process involves mainly three steps Compilation, Execution and Reports generation.
-Gatling is divided in three projects – Gatling, Gatling VTD and Gatling
-High charts and 9 modules.
-API’s allow developers to add components and plugins in an easy way.
Gatling Process overview:
-Record simulation using Gatling Recorder
-To record the scenarios we will use the Gatling Recorder which records all the actions performed on the web application. For this purpose we need to configure the browser to use Gatling recorder’s proxy. Gatling recorder tool is launched by running a batch file located in the bin directory. “gatling-charts-highcharts-bundle-2.1.6\bin”
Record the scenario:
View and Analyze Results:
HTML Report contains two tabs. Global section is meant for consolidated statistics and all reports are for overall simulation. Details section is meant for request specific statistics. Reports under this section are available for each request. If user clicks on request then report for that specific request will be displayed.