Jenkins Pipelining
and
Gatling Integration
By :-
Yashpal
Software Consultant
KNOLDUS SOFTWARE LLP
Agenda

What is Jenkins?

Jenkins Setup

Demo

Pipeline- what & why?

Single Branch Pipeline

Jenkinsfile

Multi-Branch Pipeline

Gatling
Jenkins

Jenkins is a continuous integration server
written in Java.

Provides a Web-Interface and a Console to
interact and integrate applications.

Builds and tests your application on the basis
of some configured triggers and updates you
about the health of your application, test-wise,
quality-wise etc. without investing a penny.
Jenkins Setup

Download Jenkins war from https://jenkins.io/download

Move the .war file to a desired directory and Run
 $ java ­jar jenkins.war

Open Browser and hit for http://localhost:8080

First time
- It’ll ask for an auto-generated password which it has written in a file at
the host. Just copy and paste the password.
- Now it’ll ask for plug-ins to be managed, you may go for suggested.
- Create user and the Jenkins fully hosted and ready to use for your
application.
Pipeline
A Jenkins Pipeline (or simply "Pipeline" with a
capital "P") is a suite of plugins which
supports implementing and integrating
continuous delivery pipelines into Jenkins.
That is, the process of executing set of
plugins over an application in a reliable and
repeatable manner.
Types Pipeline
A Pipeline which is executed on a single
branch and for the whole project i.e. for all
branches, we use Multi-Branch Pipeline.
It can be defined like :-
1. Declarative Pipeline :- Defining the execution of
plugins from the Jenkins Interface.
2. Scripted Pipeline :- Defining the Script alongwith
the code, generally known as Jenkinsfile.
Digging into Jenkinsfile
A fully implemented and running example is
available on github: Demo Example.
Gatling

What is Gatling?

Why Gatling?

Interaction with Application

Auto-generated Report

Maven Setup in Lagom Project

Demo Gatling
What is Gatling?

It is an open-source load and performance
testing framework based on Scala, Akka and
Netty.

It is a load testing tool which ultimately
analyses the performance of your services.
Why Gatling?

With Gatling, you can forecast performance issues
and bottlenecks in your web applications.

It drastically reduce your debugging phase.

Gives best digital experience to your users and
customers.

It measures actual scalability of your application.

Easy to integrate.
Running
Load Testing
Running Application...
Interaction with Application
Auto-generated Report
Maven Setup in Lagom

Gatling requires JDK8.

Download and unzip Gatling bundle from gatling.io

Create a Gatling Module in you Existing project.

Configure a Maven Dependency in your pox.xml of Gatling and scala.
­ Gatling­charts­highcharts 2.2.5
­ scala­library 2.11.11
­ scala­reflect 2.11.11
− Copy paste gatling.conf from Gatling Bundle as a module resource and
configure the proper encoding (trusted url, charting etc.).
− Create a Simulation Script i.e. a simple Scala class, and create and run the
Scenarios (Will be explained in Demo) .
− Checkout the html performance report generated.
1. Stackoverflow
2. Jenkins Documentation
References
Jenkins Pipelining and  Gatling Integration

Jenkins Pipelining and Gatling Integration

  • 1.
    Jenkins Pipelining and Gatling Integration By:- Yashpal Software Consultant KNOLDUS SOFTWARE LLP
  • 2.
    Agenda  What is Jenkins?  JenkinsSetup  Demo  Pipeline- what & why?  Single Branch Pipeline  Jenkinsfile  Multi-Branch Pipeline  Gatling
  • 3.
    Jenkins  Jenkins is acontinuous integration server written in Java.  Provides a Web-Interface and a Console to interact and integrate applications.  Builds and tests your application on the basis of some configured triggers and updates you about the health of your application, test-wise, quality-wise etc. without investing a penny.
  • 4.
    Jenkins Setup  Download Jenkinswar from https://jenkins.io/download  Move the .war file to a desired directory and Run  $ java ­jar jenkins.war  Open Browser and hit for http://localhost:8080  First time - It’ll ask for an auto-generated password which it has written in a file at the host. Just copy and paste the password. - Now it’ll ask for plug-ins to be managed, you may go for suggested. - Create user and the Jenkins fully hosted and ready to use for your application.
  • 6.
    Pipeline A Jenkins Pipeline(or simply "Pipeline" with a capital "P") is a suite of plugins which supports implementing and integrating continuous delivery pipelines into Jenkins. That is, the process of executing set of plugins over an application in a reliable and repeatable manner.
  • 8.
    Types Pipeline A Pipelinewhich is executed on a single branch and for the whole project i.e. for all branches, we use Multi-Branch Pipeline. It can be defined like :- 1. Declarative Pipeline :- Defining the execution of plugins from the Jenkins Interface. 2. Scripted Pipeline :- Defining the Script alongwith the code, generally known as Jenkinsfile.
  • 10.
    Digging into Jenkinsfile Afully implemented and running example is available on github: Demo Example.
  • 11.
    Gatling  What is Gatling?  WhyGatling?  Interaction with Application  Auto-generated Report  Maven Setup in Lagom Project  Demo Gatling
  • 12.
    What is Gatling?  Itis an open-source load and performance testing framework based on Scala, Akka and Netty.  It is a load testing tool which ultimately analyses the performance of your services.
  • 13.
    Why Gatling?  With Gatling,you can forecast performance issues and bottlenecks in your web applications.  It drastically reduce your debugging phase.  Gives best digital experience to your users and customers.  It measures actual scalability of your application.  Easy to integrate.
  • 14.
  • 15.
  • 16.
    Maven Setup inLagom  Gatling requires JDK8.  Download and unzip Gatling bundle from gatling.io  Create a Gatling Module in you Existing project.  Configure a Maven Dependency in your pox.xml of Gatling and scala. ­ Gatling­charts­highcharts 2.2.5 ­ scala­library 2.11.11 ­ scala­reflect 2.11.11 − Copy paste gatling.conf from Gatling Bundle as a module resource and configure the proper encoding (trusted url, charting etc.). − Create a Simulation Script i.e. a simple Scala class, and create and run the Scenarios (Will be explained in Demo) . − Checkout the html performance report generated.
  • 17.
    1. Stackoverflow 2. JenkinsDocumentation References