SlideShare a Scribd company logo
1 of 27
Download to read offline
Continuous Performance
Load testing for developers with Gatling
Bert	
  Jan	
  Schrijver
@bjschrijverbertjan@jpoint.nl
@bjschrijver@bjschrijver
Bert Jan Schrijver
Let’s meet
@bjschrijver@bjschrijver
Outline
• Performance testing process
• Introduction to Gatling
• Demo
• Results
• Looking forward
• Summary
• Q&A
@bjschrijver@bjschrijver
How it all started…
@bjschrijver@bjschrijver
Performance testing should be
part of the process
@bjschrijver@bjschrijver
Performance testing traditionally…
…happens several times per year



…and/or at major releases



…is performed by specialists



.. which is far from ideal:



- changes were made long ago



- many different code changes



- at a certain moment in time



- when is a test required?



@bjschrijver@bjschrijver
Traditional performance testing
design
write code
test code
performance test
release
unit tests
integration tests
@bjschrijver@bjschrijver
design
write code
test code
release
unit tests
integration tests
performance tests
Performance testing in 

continuous delivery
@bjschrijver@bjschrijver
Continuous Delivery
Demands code to be
Always production ready
Short feedback cycles
Maintained by self-supporting

teams
In regard to performance
Has to be under control
Effects should be clear ASAP
No external specialists
@bjschrijver@bjschrijver
Part of the process
With the same level of support as

- Unit-tests and integration tests

- Continuous Integration

- Zero-downtime deployments

Performed by the development team
@bjschrijver@bjschrijver
Performance testing process
Design Record Operationalise Execute Report
@bjschrijver@bjschrijver
Designing scenarios
Generic tests used to test core functionality
Specialised tests used to test specific features
@bjschrijver@bjschrijver
Tool support is key for
performance test adoption
@bjschrijver@bjschrijver
Gatling
package computerdatabase // 1
import io.gatling.core.Predef._ // 2
import io.gatling.http.Predef._
import scala.concurrent.duration._
class BasicSimulation extends Simulation { // 3
val httpConf = http // 4
.baseURL("http://computer-database.gatling.io") // 5
.acceptHeader("text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8") // 6
.doNotTrackHeader("1")
.acceptLanguageHeader("en-US,en;q=0.5")
.acceptEncodingHeader("gzip, deflate")
.userAgentHeader("Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Firefox/31.0")
val scn = scenario("BasicSimulation") // 7
.exec(http("request_1") // 8
.get("/")) // 9
.pause(5) // 10
setUp( // 11
scn.inject(atOnceUsers(1)) // 12
).protocols(httpConf) // 13
}
@bjschrijver@bjschrijver
Alternative tools
And many more…
@bjschrijver@bjschrijver
Gatling core concepts
Scenario
Feeder
A sequence of http requests used to simulate application usage
A tool used to fill request parameters
Recorder The tool used to record http requests or take a HAR-file 

and convert it to Gatling DSL
Gatling DSL Easy-to-read, developer-friendly way of defining tests
@bjschrijver
DEMO
@bjschrijver@bjschrijver
Scenario to outcome
Browser HAR-file
Gatling recorder DSL
Custom changes DSL
Gatling Report
@bjschrijver
DEMO
@bjschrijver@bjschrijver
Reports
@bjschrijver@bjschrijver
Interpretations
We can

See how changes affect performance

Have feedback on performance in short amount of time



We cannot

See which load the application can endure in production

@bjschrijver@bjschrijver
Results so far
- At least one time prevented issues in production
- Helped testing performance fixes and database tuning
- Discovered configuration error in test infrastructure
- Helped track down and validate a fix for a memory leak
@bjschrijver@bjschrijver
- Automate (re-)recording process
- Re-use functional test scenarios as performance tests
- Eliminate custom code changes
Further development
@bjschrijver
SUMMARY
@bjschrijver@bjschrijver
Some take-aways
Performance testing should be a first class citizen in your development cycle
Frontend changes can impact backend performance
Gatling is an awesome programmer friendly tool for load testing
The approach I shared monitors performance trends - it does NOT determine
the maximum load a production environment can endure
https://github.com/timve/continuous-performance-demo
https://github.com/bertjan/gatling-seed
@bjschrijver
Q&A
@bjschrijver@bjschrijver
Thanks for your time!
Please care about
conference quality.
Liked it? Tweet it!

More Related Content

Viewers also liked

GOTO Amsterdam 2016 - The DevOps Disaster
GOTO Amsterdam 2016 - The DevOps DisasterGOTO Amsterdam 2016 - The DevOps Disaster
GOTO Amsterdam 2016 - The DevOps DisasterBert Jan Schrijver
 
Codemotion tech pills - Continuous performance
Codemotion tech pills  - Continuous performanceCodemotion tech pills  - Continuous performance
Codemotion tech pills - Continuous performanceBert Jan Schrijver
 
Codemotion Amsterdam 2016 - Building microservices with Vert.x
Codemotion Amsterdam 2016 - Building microservices with Vert.xCodemotion Amsterdam 2016 - Building microservices with Vert.x
Codemotion Amsterdam 2016 - Building microservices with Vert.xBert Jan Schrijver
 
Utrecht JUG - Building microservices with Vert.x
Utrecht JUG - Building microservices with Vert.xUtrecht JUG - Building microservices with Vert.x
Utrecht JUG - Building microservices with Vert.xBert Jan Schrijver
 
Devoxx UK 2016 - Building microservices with Vert.x
Devoxx UK 2016 - Building microservices with Vert.xDevoxx UK 2016 - Building microservices with Vert.x
Devoxx UK 2016 - Building microservices with Vert.xBert Jan Schrijver
 
Codemotion Amsterdam 2016 - The DevOps Disaster
Codemotion Amsterdam 2016 - The DevOps DisasterCodemotion Amsterdam 2016 - The DevOps Disaster
Codemotion Amsterdam 2016 - The DevOps DisasterBert Jan Schrijver
 
Utrecht JUG - Pipeline as code
Utrecht JUG - Pipeline as codeUtrecht JUG - Pipeline as code
Utrecht JUG - Pipeline as codeBert Jan Schrijver
 
Jfokus 2017 - The DevOps Disaster
Jfokus 2017 - The DevOps Disaster Jfokus 2017 - The DevOps Disaster
Jfokus 2017 - The DevOps Disaster Bert Jan Schrijver
 

Viewers also liked (8)

GOTO Amsterdam 2016 - The DevOps Disaster
GOTO Amsterdam 2016 - The DevOps DisasterGOTO Amsterdam 2016 - The DevOps Disaster
GOTO Amsterdam 2016 - The DevOps Disaster
 
Codemotion tech pills - Continuous performance
Codemotion tech pills  - Continuous performanceCodemotion tech pills  - Continuous performance
Codemotion tech pills - Continuous performance
 
Codemotion Amsterdam 2016 - Building microservices with Vert.x
Codemotion Amsterdam 2016 - Building microservices with Vert.xCodemotion Amsterdam 2016 - Building microservices with Vert.x
Codemotion Amsterdam 2016 - Building microservices with Vert.x
 
Utrecht JUG - Building microservices with Vert.x
Utrecht JUG - Building microservices with Vert.xUtrecht JUG - Building microservices with Vert.x
Utrecht JUG - Building microservices with Vert.x
 
Devoxx UK 2016 - Building microservices with Vert.x
Devoxx UK 2016 - Building microservices with Vert.xDevoxx UK 2016 - Building microservices with Vert.x
Devoxx UK 2016 - Building microservices with Vert.x
 
Codemotion Amsterdam 2016 - The DevOps Disaster
Codemotion Amsterdam 2016 - The DevOps DisasterCodemotion Amsterdam 2016 - The DevOps Disaster
Codemotion Amsterdam 2016 - The DevOps Disaster
 
Utrecht JUG - Pipeline as code
Utrecht JUG - Pipeline as codeUtrecht JUG - Pipeline as code
Utrecht JUG - Pipeline as code
 
Jfokus 2017 - The DevOps Disaster
Jfokus 2017 - The DevOps Disaster Jfokus 2017 - The DevOps Disaster
Jfokus 2017 - The DevOps Disaster
 

Similar to JavaLand 2016: Continuous performance

Sdb Presentatie
Sdb PresentatieSdb Presentatie
Sdb Presentatiemenfey
 
Fail fast Fail cheap - Agile Development, Testing & Delivery
Fail fast Fail cheap - Agile Development, Testing & DeliveryFail fast Fail cheap - Agile Development, Testing & Delivery
Fail fast Fail cheap - Agile Development, Testing & Deliveryltebbens
 
PFZ Workshop - Automatiseren van functionele tests
PFZ Workshop - Automatiseren van functionele testsPFZ Workshop - Automatiseren van functionele tests
PFZ Workshop - Automatiseren van functionele testsRichard Tuin
 
Starten met geautomatiseerd testen - SDN 2013
Starten met geautomatiseerd testen - SDN 2013Starten met geautomatiseerd testen - SDN 2013
Starten met geautomatiseerd testen - SDN 2013Delta-N
 
JavaLand 2017 - Pipeline as code
JavaLand 2017 - Pipeline as codeJavaLand 2017 - Pipeline as code
JavaLand 2017 - Pipeline as codeBert Jan Schrijver
 
Hands-off performance testing - Twan Koot & Addy Zwiebel
Hands-off performance testing - Twan Koot & Addy ZwiebelHands-off performance testing - Twan Koot & Addy Zwiebel
Hands-off performance testing - Twan Koot & Addy ZwiebelSogeti Nederland B.V.
 
ING : How top quality software and state-of-the-art technology leads to conti...
ING : How top quality software and state-of-the-art technology leads to conti...ING : How top quality software and state-of-the-art technology leads to conti...
ING : How top quality software and state-of-the-art technology leads to conti...NLJUG
 
Workshop BI/DWH AGILE TESTING Zwitserleven Dutch
Workshop BI/DWH AGILE TESTING Zwitserleven DutchWorkshop BI/DWH AGILE TESTING Zwitserleven Dutch
Workshop BI/DWH AGILE TESTING Zwitserleven DutchMarcus Drost
 
Continuous delivery met jenkins twist en puppet
Continuous delivery met jenkins twist en puppetContinuous delivery met jenkins twist en puppet
Continuous delivery met jenkins twist en puppetltebbens
 
DSD-NL 2014 - iMOD Symposium - 6. Reproduceerbaarheid en Kwaliteitsborging, W...
DSD-NL 2014 - iMOD Symposium - 6. Reproduceerbaarheid en Kwaliteitsborging, W...DSD-NL 2014 - iMOD Symposium - 6. Reproduceerbaarheid en Kwaliteitsborging, W...
DSD-NL 2014 - iMOD Symposium - 6. Reproduceerbaarheid en Kwaliteitsborging, W...Deltares
 
Presentatie dso leveranciersdag 17 november
Presentatie dso leveranciersdag 17 novemberPresentatie dso leveranciersdag 17 november
Presentatie dso leveranciersdag 17 novemberKING
 
Web applicatie van scratch
Web applicatie van scratchWeb applicatie van scratch
Web applicatie van scratchHanzehogeschool
 
Requirements en testing
Requirements en testingRequirements en testing
Requirements en testingPim Snel
 
Versiebeheer van database changes
Versiebeheer van database changesVersiebeheer van database changes
Versiebeheer van database changesArjen van Vliet
 
Agile, Continuous Delivery & DevOps in perspectief
Agile, Continuous Delivery & DevOps in perspectiefAgile, Continuous Delivery & DevOps in perspectief
Agile, Continuous Delivery & DevOps in perspectiefMaurice Roos
 
HTML 5, ASP.NET MVC & Windows Azure sessie voor Ivo Brugge
HTML 5, ASP.NET MVC & Windows Azure sessie voor Ivo BruggeHTML 5, ASP.NET MVC & Windows Azure sessie voor Ivo Brugge
HTML 5, ASP.NET MVC & Windows Azure sessie voor Ivo BruggePureplexity
 
TMap dag - Agile testautomatisering in de praktijk
TMap dag - Agile testautomatisering in de praktijkTMap dag - Agile testautomatisering in de praktijk
TMap dag - Agile testautomatisering in de praktijkJori Ramakers
 

Similar to JavaLand 2016: Continuous performance (20)

Sdb Presentatie
Sdb PresentatieSdb Presentatie
Sdb Presentatie
 
Fail fast Fail cheap - Agile Development, Testing & Delivery
Fail fast Fail cheap - Agile Development, Testing & DeliveryFail fast Fail cheap - Agile Development, Testing & Delivery
Fail fast Fail cheap - Agile Development, Testing & Delivery
 
PFZ Workshop - Automatiseren van functionele tests
PFZ Workshop - Automatiseren van functionele testsPFZ Workshop - Automatiseren van functionele tests
PFZ Workshop - Automatiseren van functionele tests
 
Starten met geautomatiseerd testen - SDN 2013
Starten met geautomatiseerd testen - SDN 2013Starten met geautomatiseerd testen - SDN 2013
Starten met geautomatiseerd testen - SDN 2013
 
JavaLand 2017 - Pipeline as code
JavaLand 2017 - Pipeline as codeJavaLand 2017 - Pipeline as code
JavaLand 2017 - Pipeline as code
 
Agile - De Rol Van Tester
Agile - De Rol Van TesterAgile - De Rol Van Tester
Agile - De Rol Van Tester
 
Hands-off performance testing - Twan Koot & Addy Zwiebel
Hands-off performance testing - Twan Koot & Addy ZwiebelHands-off performance testing - Twan Koot & Addy Zwiebel
Hands-off performance testing - Twan Koot & Addy Zwiebel
 
ING : How top quality software and state-of-the-art technology leads to conti...
ING : How top quality software and state-of-the-art technology leads to conti...ING : How top quality software and state-of-the-art technology leads to conti...
ING : How top quality software and state-of-the-art technology leads to conti...
 
Coww 2.16 Presentatie Wim La Haye
Coww 2.16 Presentatie Wim La HayeCoww 2.16 Presentatie Wim La Haye
Coww 2.16 Presentatie Wim La Haye
 
Workshop BI/DWH AGILE TESTING Zwitserleven Dutch
Workshop BI/DWH AGILE TESTING Zwitserleven DutchWorkshop BI/DWH AGILE TESTING Zwitserleven Dutch
Workshop BI/DWH AGILE TESTING Zwitserleven Dutch
 
Continuous delivery met jenkins twist en puppet
Continuous delivery met jenkins twist en puppetContinuous delivery met jenkins twist en puppet
Continuous delivery met jenkins twist en puppet
 
DSD-NL 2014 - iMOD Symposium - 6. Reproduceerbaarheid en Kwaliteitsborging, W...
DSD-NL 2014 - iMOD Symposium - 6. Reproduceerbaarheid en Kwaliteitsborging, W...DSD-NL 2014 - iMOD Symposium - 6. Reproduceerbaarheid en Kwaliteitsborging, W...
DSD-NL 2014 - iMOD Symposium - 6. Reproduceerbaarheid en Kwaliteitsborging, W...
 
Presentatie dso leveranciersdag 17 november
Presentatie dso leveranciersdag 17 novemberPresentatie dso leveranciersdag 17 november
Presentatie dso leveranciersdag 17 november
 
Web applicatie van scratch
Web applicatie van scratchWeb applicatie van scratch
Web applicatie van scratch
 
H6 Realisatiefase
H6 RealisatiefaseH6 Realisatiefase
H6 Realisatiefase
 
Requirements en testing
Requirements en testingRequirements en testing
Requirements en testing
 
Versiebeheer van database changes
Versiebeheer van database changesVersiebeheer van database changes
Versiebeheer van database changes
 
Agile, Continuous Delivery & DevOps in perspectief
Agile, Continuous Delivery & DevOps in perspectiefAgile, Continuous Delivery & DevOps in perspectief
Agile, Continuous Delivery & DevOps in perspectief
 
HTML 5, ASP.NET MVC & Windows Azure sessie voor Ivo Brugge
HTML 5, ASP.NET MVC & Windows Azure sessie voor Ivo BruggeHTML 5, ASP.NET MVC & Windows Azure sessie voor Ivo Brugge
HTML 5, ASP.NET MVC & Windows Azure sessie voor Ivo Brugge
 
TMap dag - Agile testautomatisering in de praktijk
TMap dag - Agile testautomatisering in de praktijkTMap dag - Agile testautomatisering in de praktijk
TMap dag - Agile testautomatisering in de praktijk
 

JavaLand 2016: Continuous performance