SlideShare a Scribd company logo
Load Test APIs using Gatling
Jayaram Sankaranarayanan
Gatling
Simulation Scripts written in Scala
Gatling runtime interprets Scala scripts and runs the tests
Virtual Users invoking series of APIs concurrently
Define test scenarios
Feeders to inject runtime values for tests
Record & Replay
First, a bit of Scala
• Immutability
• vals rule
• no one messes with my data
• Functions
• def a function
• parameters, yes with default
• return more than one, really ?
• no side effects
• function composition
• functions as first class citizens
• Object Oriented Scala
• Classes, Objects, Traits
• Collections
• No more looping
• How to do => What to do
Lets see in Action - ScalaREPL
Now , get back to
Load Testing REST APIs
using Gatling
Pre-Requisites
• Install sbt
• configure gatling plugin
• build and run tests
• Install ScalaIDE
• so that we can write code
Gatling Simulation
• Create Scenarios
• define execution steps
• supports http/s or Websockets
• chain the steps together
• Inject pause times for simulating real life events
• Trigger Scenario
• Rampup Virtual Users
• Execute scenarios
• Specify either the duration / iteration count
• Feeders
• Use feeders to inject runtime varying values
• feed values for every iteration of the scenario
Run Test
• Using sbt
• sbt test
• sbt ‘testOnly com.myorg.api.load.MyApiLoadTest’
• Trigger From Jenkins
• Use Jenkins SBT plugin and Gatling Plugin
• Archive Load test reports
• Report failure using TextFinderPlugin
• Test Report
• reports in <Project>/target/gatling/*
gatling.io

More Related Content

What's hot (20)

PPTX
Top 10 RxJs Operators in Angular
Jalpesh Vadgama
 
PDF
Performance tests with gatling
SoftwareMill
 
PDF
rx-java-presentation
Mateusz Bukowicz
 
ODP
Drilling the Async Library
Knoldus Inc.
 
PDF
React meets o OCalm
Michał Załęcki
 
PDF
TestWorks Conf Performance testing made easy with gatling - Guillaume Corré
Xebia Nederland BV
 
PDF
Reactive programming using rx java & akka actors - pdx-scala - june 2014
Thomas Lockney
 
PDF
Reactive programming with Rxjava
Christophe Marchal
 
PPTX
Gatling
Swapnil Kotwal
 
PPTX
Project Reactor By Example
Denny Abraham Cheriyan
 
PPTX
Welcome Azure Functions 2. 0
Massimo Bonanni
 
PPTX
Javantura v3 - ES6 – Future Is Now – Nenad Pečanac
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
PDF
Reflection in Pharo5
Marcus Denker
 
PDF
New in Spring Framework 5.0: Functional Web Framework
VMware Tanzu
 
PDF
Reactive java - Reactive Programming + RxJava
NexThoughts Technologies
 
PDF
Gatling workshop lets test17
Gerald Muecke
 
PDF
Developer-friendly taskqueues: What you should ask yourself before choosing one
Sylvain Zimmer
 
ODP
Jenkins Pipelining and Gatling Integration
Knoldus Inc.
 
PDF
Introduction to Akka
Knoldus Inc.
 
PDF
Angular & RXJS: examples and use cases
Fabio Biondi
 
Top 10 RxJs Operators in Angular
Jalpesh Vadgama
 
Performance tests with gatling
SoftwareMill
 
rx-java-presentation
Mateusz Bukowicz
 
Drilling the Async Library
Knoldus Inc.
 
React meets o OCalm
Michał Załęcki
 
TestWorks Conf Performance testing made easy with gatling - Guillaume Corré
Xebia Nederland BV
 
Reactive programming using rx java & akka actors - pdx-scala - june 2014
Thomas Lockney
 
Reactive programming with Rxjava
Christophe Marchal
 
Project Reactor By Example
Denny Abraham Cheriyan
 
Welcome Azure Functions 2. 0
Massimo Bonanni
 
Javantura v3 - ES6 – Future Is Now – Nenad Pečanac
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
Reflection in Pharo5
Marcus Denker
 
New in Spring Framework 5.0: Functional Web Framework
VMware Tanzu
 
Reactive java - Reactive Programming + RxJava
NexThoughts Technologies
 
Gatling workshop lets test17
Gerald Muecke
 
Developer-friendly taskqueues: What you should ask yourself before choosing one
Sylvain Zimmer
 
Jenkins Pipelining and Gatling Integration
Knoldus Inc.
 
Introduction to Akka
Knoldus Inc.
 
Angular & RXJS: examples and use cases
Fabio Biondi
 

Viewers also liked (10)

PDF
Load testing with gatling
Chris Birchall
 
PDF
Skinny Framework 1.0.0
Kazuhiro Sera
 
PDF
Continuous performance: Load testing for developers with gatling @ JavaOne 2016
Tim van Eijndhoven
 
PDF
Continuous validation of load test suites
SAIL_QU
 
PDF
STARWest: Use Jenkins For Continuous 
Load Testing And Mobile Test Automation
Clever Moe
 
PPTX
Load-testing 101 for Startups with Artillery.io
Hassy Veldstra
 
PPT
Learning pmp formulas the easy way
Mark Troncone MBA, PMP, CBAP, ITILv3, CSM
 
PDF
Free PMP notes,Free PMP Study Material,Free PMP Chapter wise notes,PMP Exam N...
TURKI , PMP
 
PDF
PMP 1600 Questions by TechFAQ360
Artonline Home
 
PDF
PMBOK® Guide 5th edition Processes Flow in English - Simplified Version
Ricardo Viana Vargas
 
Load testing with gatling
Chris Birchall
 
Skinny Framework 1.0.0
Kazuhiro Sera
 
Continuous performance: Load testing for developers with gatling @ JavaOne 2016
Tim van Eijndhoven
 
Continuous validation of load test suites
SAIL_QU
 
STARWest: Use Jenkins For Continuous 
Load Testing And Mobile Test Automation
Clever Moe
 
Load-testing 101 for Startups with Artillery.io
Hassy Veldstra
 
Learning pmp formulas the easy way
Mark Troncone MBA, PMP, CBAP, ITILv3, CSM
 
Free PMP notes,Free PMP Study Material,Free PMP Chapter wise notes,PMP Exam N...
TURKI , PMP
 
PMP 1600 Questions by TechFAQ360
Artonline Home
 
PMBOK® Guide 5th edition Processes Flow in English - Simplified Version
Ricardo Viana Vargas
 
Ad

Similar to Load test REST APIs using gatling (19)

PDF
Gatling Performance Workshop
Sai Krishna
 
ODP
Boost your App with Gatling
Knoldus Inc.
 
PDF
GatlingJAX2022.pdf
StphaneLANDELLE
 
PPTX
Gatling
Tengwen Wang
 
PDF
Load testing in Zonky with Gatling
Petr Vlček
 
PDF
Gatling - SoftShake 2013
Pierre DAL-PRA
 
PDF
Blast your app with Gatling! by Stephane Landelle
ZeroTurnaround
 
PDF
Gatling - Paris Perf User Group
slandelle
 
PPTX
Gatling and Page Object: a way to performance testing
Katherine Golovinova
 
PDF
Continuous performance: Load testing for developers with gatling @ Utrecht JUG
Tim van Eijndhoven
 
PDF
API Performance testing with Gatling
Tetiana Polishchuk
 
PPTX
Интеграция решения по тестированию производительности в существующий фреймвор...
COMAQA.BY
 
PDF
Spark summit2014 techtalk - testing spark
Anu Shetty
 
PDF
Amsterdam JUG - Continuous performance
Bert Jan Schrijver
 
PDF
Codemotion tech pills - Continuous performance
Bert Jan Schrijver
 
PDF
Gatling & LoadUI : Open Source Performance Testing Tools
vodQA
 
PDF
Gatling & LoadUI - Open Source Tools For Preformance Testing
Raman Kansal
 
PDF
DeTesters meetup november 2018 - Continuous performance: load testing with G...
Bert Jan Schrijver
 
PDF
Gatling.pptx
Nalini Kanth
 
Gatling Performance Workshop
Sai Krishna
 
Boost your App with Gatling
Knoldus Inc.
 
GatlingJAX2022.pdf
StphaneLANDELLE
 
Gatling
Tengwen Wang
 
Load testing in Zonky with Gatling
Petr Vlček
 
Gatling - SoftShake 2013
Pierre DAL-PRA
 
Blast your app with Gatling! by Stephane Landelle
ZeroTurnaround
 
Gatling - Paris Perf User Group
slandelle
 
Gatling and Page Object: a way to performance testing
Katherine Golovinova
 
Continuous performance: Load testing for developers with gatling @ Utrecht JUG
Tim van Eijndhoven
 
API Performance testing with Gatling
Tetiana Polishchuk
 
Интеграция решения по тестированию производительности в существующий фреймвор...
COMAQA.BY
 
Spark summit2014 techtalk - testing spark
Anu Shetty
 
Amsterdam JUG - Continuous performance
Bert Jan Schrijver
 
Codemotion tech pills - Continuous performance
Bert Jan Schrijver
 
Gatling & LoadUI : Open Source Performance Testing Tools
vodQA
 
Gatling & LoadUI - Open Source Tools For Preformance Testing
Raman Kansal
 
DeTesters meetup november 2018 - Continuous performance: load testing with G...
Bert Jan Schrijver
 
Gatling.pptx
Nalini Kanth
 
Ad

Recently uploaded (20)

PDF
Staying Human in a Machine- Accelerated World
Catalin Jora
 
PPT
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PDF
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
PDF
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
PPTX
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
PDF
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
PPTX
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PDF
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
PPTX
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
Staying Human in a Machine- Accelerated World
Catalin Jora
 
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 

Load test REST APIs using gatling

  • 1. Load Test APIs using Gatling Jayaram Sankaranarayanan
  • 2. Gatling Simulation Scripts written in Scala Gatling runtime interprets Scala scripts and runs the tests Virtual Users invoking series of APIs concurrently Define test scenarios Feeders to inject runtime values for tests Record & Replay
  • 3. First, a bit of Scala
  • 4. • Immutability • vals rule • no one messes with my data • Functions • def a function • parameters, yes with default • return more than one, really ? • no side effects • function composition • functions as first class citizens • Object Oriented Scala • Classes, Objects, Traits • Collections • No more looping • How to do => What to do Lets see in Action - ScalaREPL
  • 5. Now , get back to Load Testing REST APIs using Gatling
  • 6. Pre-Requisites • Install sbt • configure gatling plugin • build and run tests • Install ScalaIDE • so that we can write code
  • 7. Gatling Simulation • Create Scenarios • define execution steps • supports http/s or Websockets • chain the steps together • Inject pause times for simulating real life events • Trigger Scenario • Rampup Virtual Users • Execute scenarios • Specify either the duration / iteration count • Feeders • Use feeders to inject runtime varying values • feed values for every iteration of the scenario
  • 8. Run Test • Using sbt • sbt test • sbt ‘testOnly com.myorg.api.load.MyApiLoadTest’ • Trigger From Jenkins • Use Jenkins SBT plugin and Gatling Plugin • Archive Load test reports • Report failure using TextFinderPlugin • Test Report • reports in <Project>/target/gatling/*