Thursday, December 29, 2016

Gatling - Installation


You can get Gatling bundles as a .zip file here.

Installing

Just unzip the downloaded bundle to a folder of your choice.
Warning
Windows users : we recommend that you do not place Gatling in the Programs folder as there may be permission issues.
In order to run Gatling, you need to have a JDK installed. Gatling requires JDK8, yet we recommend that you use an up-to-date version.
Warning
Gatling launch scripts and Gatling maven plugin honor JAVA_HOME env var if it’s set. OS, like OSX, have their own tricky way of discovering which version of Java to run, so you might end up running a different version than the one java -version tells you. If you get strange errors such as Unsupported major.minor version 51.0 and you were expecting to run a JDK8, you might want to explicitly set JAVA_HOME.
And also Set Gatling home GATLING_HOME. 

A Word on Encoding

Gatling’s default encoding is UTF-8. If you want to use a different one, you have to:
  • select the proper encoding while using the Recorder
  • configure the proper encoding in the gatling.conf file.
    It will be used for compiling your simulations, building your requests and your responses.
  • make sure your text editor encoding is properly configured to match.


Once you extract the archive, you will find a number of directories. Here is quick rundown:



  •  bin - scripts to launch Gatling for your platform The "bin\" folder contains the gatling.bat & gatling.sh (for corresponding OS - Windows & UNIX). It also contains the recorder.bat & recorder.sh, which is used for recording a scenario & which is later useful for writing one
  • conf - configuration files
  • lib - a bunch of jars to make Gatling run
  • results - it will contain the results of your test runs
  • user-files - where you will place scripts and data folder contains three folders namely :

Getting started with Gatling for Stress Testing



  • data\: This folder contains the csv files which are used to inject user specific data to the scenarios that written. 
  • request bodies: This folder contains the body of the request (POST Method) in the JSON & XML format as required. 
  • Simulations: This folder contains the simulations that are triggered when one runs the gatling.bat batch file. One can always re-arrange simulation files inside the simulations folder.

No comments:

Post a Comment