In this tutorial I will explain the installation & configuration Gatling Testing Tool.
- Results & Reports
- Java JDK
First of all, we need to install Gatling from command-line or from this link
From the command line : apt-get install gatling
After running ./gatling.sh command, you will see simulation number prompt text to select simulation number from shown list, and you can give a short description for this run.
- /results: contains the benchmark results in web format
- /bin: contains the scripts for launching Gatling
- /target: contains the files resulting from the compilation of our scenarios + cache
- /conf: contains configuration files (log level -will be explained)
- /user-files: contains the .scala scenario definition files
- /lib: gatling jar
You can add your own simulations to the folder /user-files/simulations
A Simulation is a real Scala class containing 4 different parts:
- The HTTP protocol configuration
- The headers definition
- The scenario definition
- The simulation definition
To configure Gatling you edit the configuration file – # This file contains all the settings configurable for Gatling with their default values.
- Directory show default locations:
- For report customization, depends on projects needs, default values & explanations below:
- Monitoring configuration:
To configure Gatling logging you can edit the logback.xml configuration file.
- Scripts are scala code
- Defines a DSL designed for expressing load tests, easy to learn scripts just reading.
- Meaningful charts
- Graphite & Jenkins Integration
- Supports input files CSV, TSV, SSV to access random data for Data-Driven tests.
For recording, browser proxy: 127.0.0.1 and port: 8888
now just run ./recorder.sh under bin directory.
below screen show up, we will use to create scenarios just click on the start button.
We can include or exclude requests ( e.g. images, CSS, JS etc. ) using whitelist & blacklist options, For example if you don’t want to record any CSS files you can use some regex.
We are ready to record scenario.
go to address: www.teknosa.com
Results & Reports
After running your scenario, you can find the results under your /results folder as the index.html file. Below chart shows how response times are distributed among standard ranges (can be configured )
Executions Success and Failures, can go into details on every request.
In next post, I will show some load testing scenarios using gatling & jenkins integration.