Skip to content

Using gatling to test APIs using a CSV file via Jenkins / Command Line

Notifications You must be signed in to change notification settings

irynakozak2/gatling-csv-input

Repository files navigation

This example is based on the official documentation from the following websites;
Requirements
  • A CentOS box
  • Java 8
  • Gatling 2.2.3
Explanation

Using Jenkins to kick of a pipeline job, or using CLI to execute a Gatling (load) simulation on multiple url's stored in a CSV...

Install Gatling Jenkins (master/slave) nodes
$ mkdir /opt/gatling/
$ wget https://repo1.maven.org/maven2/io/gatling/highcharts/gatling-charts-highcharts-bundle/2.2.3/gatling-charts-highcharts-bundle-2.2.3-bundle.zip -P /opt/gatling/
$ unzip -o /opt/gatling/gatling-charts-highcharts-bundle-2.2.3-bundle.zip -d /opt/gatling
Install the Jenkins gatling plugin
Create a pipeline job in Jenkins

alt text

Pipeline job post configuration

alt text

Or; run gatling simulation from the command line
  • firstly; setting all variables
$ export JAVA_OPTS="-DcsvFile=TestApiSimulation.csv -Dduration=10 -DrampNUsers=1 -DrampDuration=1 -DrunInvalidator=false"
  • secondly; running the actual simulation
$ ./gatling.sh -s my.gatling.TestApiSimulation -sf /opt/gatling-tests/TestApiSimulation -df /opt/gatling-tests/TestApiSimulation -rf /opt/gatling-tests/TestApiSimulation

About

Using gatling to test APIs using a CSV file via Jenkins / Command Line

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages