SlideShare ist ein Scribd-Unternehmen logo
1 von 29
Downloaden Sie, um offline zu lesen
Oružje u redovimaOružje u redovima
performansnog testiranja
Andrija Kranjec
Agenda
• Što je Gatling?
• Problemi kod alata za testiranje
• Gatling kao rješenje
• Demo• Demo
• Testiranje JVM aplikacija
Što je Gatling?
Sliku ustupio Dean Sekulić (Croteam)
Gatling je alat za simulaciju
opterećenja na testiranoj aplikaciji,
provodi pripadna mjerenja iprovodi pripadna mjerenja i
prezentira rezultate provedenog
performansnog testiranja.
Još jedan u nizu alata
Problemi kod alata za testiranjeProblemi kod alata za testiranje
Cijena
Photo by Siphiwe Sibeko / Reuters
1 dretva = 1 korisnik
Photo by Alessandro Garofalo / Reuters
Dretve čekaju…
Photo by Larry Downing / Reuters
…i spavaju.
Photo by Stringer Shanghai / Reuters
Komplicirano sučelje
Photo by Ben Cooper
• Baziran na Actor Modelu
• Asinkron
• Koristi Non-Blocking algoritme
Gatling kao rješenje
• Koristi Non-Blocking algoritme
Lako pisanje testova*Lako pisanje testova*
*pod uvjetom da ste programer
Testovi se pišu korištenjem Gatling DSL-a
koji je implementiran u Scala programskom
jeziku.
Definiranje scenarija - opisuju ponašanja virtualnih korisnika
scenario
exec / group / pause / pauseExp / pauseCustom
doIf / doIfOrElse / randomSwitch / roundRobinSwitch
repeat / during / asLongAs / foreach
tryMax / exitBlockOnFail / exitHereIfFailed
Definiranje feedera - ubacivanje podataka u scenarij
csv / tsv / ssv / jdbc / redisFeeder
Gatling DSL
csv / tsv / ssv / jdbc / redisFeeder
queue / random / circular
Konfiguracija scenarija - manipulacija izvršavanja
users / ramp / delay / protocolConfig
HTTP akcije - upravljanje HTTP zahtjevima
http
get / post / put / delete / head
queryParam / header / headers / basicAuth
body / fileBody / byteArrayBody / param / upload
Provjere - provjera sadržaja odgovora
check
status / currentLocation / header / headerRegex / responseTimeInMillis / latencyInMillis
regex / xpath / jsonPath / css / md5 / sha1
find / findAll / count
transform
is / not / exists / notExists / in / whatever
saveAs
HTTP konfiguracija – upravljanje Gatlingovim HTTP klijentom
Gatling DSL
HTTP konfiguracija – upravljanje Gatlingovim HTTP klijentom
httpconfig
baseURL / baseURLs / proxy / httpsPort / credentials
acceptHeader / acceptCharsetHeader / acceptEncodingHeader / acceptLanguageHeader /
hostHeader / userAgentHeader
disableFollowRedirect / disableAutomaticReferer / disableWarmUp / warmUp
requestInfoExtractor / responseInfoExtractor / disableResponseChunksDiscarding
Assertions – postavljanje nefunkcionalnih zahtjeva na razini scenarija
assertThat
global / details
responseTime / allRequests / failedRequests / successfulRequests /requestsPerSec
min / max / mean / stdDev / percentiles1 / percentiles2
percent / count
lessThan / greaterThan / between / is / in / assert
Gatling DSL
Napiši jednomNapiši jednom
Recikliraj stare testove
Photo by Stringer Shanghai / Reuters
Nema izlike za sistemaše...Nema izlike za sistemaše...
…postoji recorder.
Izvještaji
DemoDemo
Planirajte opterećenje
Izvor http://www.zadarskilist.hr/
Opteretili smo aplikaciju, a što dalje?Opteretili smo aplikaciju, a što dalje?
Monitoring JVM aplikacije
• CPU
• Heap memorija
• Garbage collector rate
• Thread pool
• Webcontainer pool• Webcontainer pool
• JDBC (time, connection pool,..)
• Prepare statement cache
• Response time portleta/servleta
Demo - rezultatiDemo - rezultati
Pitanja?

Weitere ähnliche Inhalte

Andere mochten auch

Andere mochten auch (20)

JavaCro'14 - Amphinicy crown jewels our software development infrastructure –...
JavaCro'14 - Amphinicy crown jewels our software development infrastructure –...JavaCro'14 - Amphinicy crown jewels our software development infrastructure –...
JavaCro'14 - Amphinicy crown jewels our software development infrastructure –...
 
JavaCro'14 - Profile any environment with Java Flight Recorder – Johan Janssen
JavaCro'14 - Profile any environment with Java Flight Recorder – Johan JanssenJavaCro'14 - Profile any environment with Java Flight Recorder – Johan Janssen
JavaCro'14 - Profile any environment with Java Flight Recorder – Johan Janssen
 
JavaCro'14 - Is there a single “correct” web architecture for business apps –...
JavaCro'14 - Is there a single “correct” web architecture for business apps –...JavaCro'14 - Is there a single “correct” web architecture for business apps –...
JavaCro'14 - Is there a single “correct” web architecture for business apps –...
 
JavaCro'14 - How to handle large amounts of data in real time using a cloud e...
JavaCro'14 - How to handle large amounts of data in real time using a cloud e...JavaCro'14 - How to handle large amounts of data in real time using a cloud e...
JavaCro'14 - How to handle large amounts of data in real time using a cloud e...
 
JavaCro'14 - Automatic database migrations – Marko Elezović
JavaCro'14 - Automatic database migrations – Marko ElezovićJavaCro'14 - Automatic database migrations – Marko Elezović
JavaCro'14 - Automatic database migrations – Marko Elezović
 
JavaCro'14 - GWT rebooted – Gordan Krešić
JavaCro'14 - GWT rebooted – Gordan KrešićJavaCro'14 - GWT rebooted – Gordan Krešić
JavaCro'14 - GWT rebooted – Gordan Krešić
 
JavaCro'14 - Sustainability of business performance and best practices – Zlat...
JavaCro'14 - Sustainability of business performance and best practices – Zlat...JavaCro'14 - Sustainability of business performance and best practices – Zlat...
JavaCro'14 - Sustainability of business performance and best practices – Zlat...
 
JavaCro'14 - Drools Decision tables – form of human-readable rules – Dragan J...
JavaCro'14 - Drools Decision tables – form of human-readable rules – Dragan J...JavaCro'14 - Drools Decision tables – form of human-readable rules – Dragan J...
JavaCro'14 - Drools Decision tables – form of human-readable rules – Dragan J...
 
JavaCro'14 - JavaScript single-page applications i JEE, can they fit together...
JavaCro'14 - JavaScript single-page applications i JEE, can they fit together...JavaCro'14 - JavaScript single-page applications i JEE, can they fit together...
JavaCro'14 - JavaScript single-page applications i JEE, can they fit together...
 
JavaCro'14 - ZeroMQ and Java(Script) – Mladen Čikara
JavaCro'14 - ZeroMQ and Java(Script) – Mladen ČikaraJavaCro'14 - ZeroMQ and Java(Script) – Mladen Čikara
JavaCro'14 - ZeroMQ and Java(Script) – Mladen Čikara
 
JavaCro'14 - WebLogic-GlassFish-JaaS Strategy and Roadmap – Duško Vukmanović
JavaCro'14 - WebLogic-GlassFish-JaaS Strategy and Roadmap – Duško VukmanovićJavaCro'14 - WebLogic-GlassFish-JaaS Strategy and Roadmap – Duško Vukmanović
JavaCro'14 - WebLogic-GlassFish-JaaS Strategy and Roadmap – Duško Vukmanović
 
JavaCro'14 - Log as basis for distributed systems – Vjeran Marčinko
JavaCro'14 - Log as basis for distributed systems – Vjeran MarčinkoJavaCro'14 - Log as basis for distributed systems – Vjeran Marčinko
JavaCro'14 - Log as basis for distributed systems – Vjeran Marčinko
 
JavaCro'14 - Scala and Java EE 7 Development Experiences – Peter Pilgrim
JavaCro'14 - Scala and Java EE 7 Development Experiences – Peter PilgrimJavaCro'14 - Scala and Java EE 7 Development Experiences – Peter Pilgrim
JavaCro'14 - Scala and Java EE 7 Development Experiences – Peter Pilgrim
 
JavaCro'14 - Developing Google Chromecast applications on Android – Branimir ...
JavaCro'14 - Developing Google Chromecast applications on Android – Branimir ...JavaCro'14 - Developing Google Chromecast applications on Android – Branimir ...
JavaCro'14 - Developing Google Chromecast applications on Android – Branimir ...
 
JavaCro'14 - Securing web applications with Spring Security 3 – Fernando Redo...
JavaCro'14 - Securing web applications with Spring Security 3 – Fernando Redo...JavaCro'14 - Securing web applications with Spring Security 3 – Fernando Redo...
JavaCro'14 - Securing web applications with Spring Security 3 – Fernando Redo...
 
JavaCro'14 - Continuous deployment tool – Aleksandar Dostić and Emir Džaferović
JavaCro'14 - Continuous deployment tool – Aleksandar Dostić and Emir DžaferovićJavaCro'14 - Continuous deployment tool – Aleksandar Dostić and Emir Džaferović
JavaCro'14 - Continuous deployment tool – Aleksandar Dostić and Emir Džaferović
 
JavaCro'14 - Can You Tell Me How to Get to Sesame Street I wanna be a Grails ...
JavaCro'14 - Can You Tell Me How to Get to Sesame Street I wanna be a Grails ...JavaCro'14 - Can You Tell Me How to Get to Sesame Street I wanna be a Grails ...
JavaCro'14 - Can You Tell Me How to Get to Sesame Street I wanna be a Grails ...
 
JavaCro'14 - The World of Java – in Croatia – Branko Mihaljević and Aleksande...
JavaCro'14 - The World of Java – in Croatia – Branko Mihaljević and Aleksande...JavaCro'14 - The World of Java – in Croatia – Branko Mihaljević and Aleksande...
JavaCro'14 - The World of Java – in Croatia – Branko Mihaljević and Aleksande...
 
JavaCro'14 - WebSockets and OpenLayers joined with Spring – Bojan Kljajin
JavaCro'14 - WebSockets and OpenLayers joined with Spring – Bojan KljajinJavaCro'14 - WebSockets and OpenLayers joined with Spring – Bojan Kljajin
JavaCro'14 - WebSockets and OpenLayers joined with Spring – Bojan Kljajin
 
JavaCro'14 - Cloud Platforms in Internet of Things – Krešimir Mišura and Bran...
JavaCro'14 - Cloud Platforms in Internet of Things – Krešimir Mišura and Bran...JavaCro'14 - Cloud Platforms in Internet of Things – Krešimir Mišura and Bran...
JavaCro'14 - Cloud Platforms in Internet of Things – Krešimir Mišura and Bran...
 

Ähnlich wie JavaCro'14 - Gatling – weapon in ranks of performance testing – Andrija Kranjec

Panel diskusija - usporedba Web frameworka (IT Showoff)
Panel diskusija - usporedba Web frameworka (IT Showoff)Panel diskusija - usporedba Web frameworka (IT Showoff)
Panel diskusija - usporedba Web frameworka (IT Showoff)IT Showoff
 
Vert.x - asinkroni skalabilni i poliglotni framework nove generacije
Vert.x - asinkroni skalabilni i poliglotni framework nove generacijeVert.x - asinkroni skalabilni i poliglotni framework nove generacije
Vert.x - asinkroni skalabilni i poliglotni framework nove generacijeMihovil Rister
 
Vert.x - Mihovil Rister, Javantura
Vert.x - Mihovil Rister, JavanturaVert.x - Mihovil Rister, Javantura
Vert.x - Mihovil Rister, JavanturaFive
 
Zašto nam treba PaaS u Srcu?
Zašto nam treba PaaS u Srcu?Zašto nam treba PaaS u Srcu?
Zašto nam treba PaaS u Srcu?Denis Kranjčec
 
GraphQL & Laravel - Efikasni API servisi
GraphQL & Laravel - Efikasni API servisiGraphQL & Laravel - Efikasni API servisi
GraphQL & Laravel - Efikasni API servisiPedja Jevtic
 
WebUG - Hibridne mobilne aplikacije
WebUG - Hibridne mobilne aplikacijeWebUG - Hibridne mobilne aplikacije
WebUG - Hibridne mobilne aplikacijeMatija Šmalcelj
 
Web App Security for Devs
Web App Security for DevsWeb App Security for Devs
Web App Security for DevsAxilis
 
Web App Security for Devs
Web App Security for DevsWeb App Security for Devs
Web App Security for DevsVedran Maršić
 
[TVZ računarstvo] Dinamičke web aplikacije, predavanje 10.
[TVZ računarstvo] Dinamičke web aplikacije, predavanje 10. [TVZ računarstvo] Dinamičke web aplikacije, predavanje 10.
[TVZ računarstvo] Dinamičke web aplikacije, predavanje 10. Stipe Predanic
 
[TVZ računarstvo] Dinamičke web aplikacije, predavanje 8.
[TVZ računarstvo] Dinamičke web aplikacije, predavanje 8. [TVZ računarstvo] Dinamičke web aplikacije, predavanje 8.
[TVZ računarstvo] Dinamičke web aplikacije, predavanje 8. Stipe Predanic
 
[TVZ računarstvo] Dinamičke web aplikacije, predavanje 9.
[TVZ računarstvo] Dinamičke web aplikacije, predavanje 9. [TVZ računarstvo] Dinamičke web aplikacije, predavanje 9.
[TVZ računarstvo] Dinamičke web aplikacije, predavanje 9. Stipe Predanic
 
Angular 2 and TypeScript - 2016 Dump Day
Angular 2 and TypeScript - 2016 Dump DayAngular 2 and TypeScript - 2016 Dump Day
Angular 2 and TypeScript - 2016 Dump DayNETMedia
 
Mean Stack JavaCro 2014
Mean Stack JavaCro 2014Mean Stack JavaCro 2014
Mean Stack JavaCro 2014Nenad Pecanac
 
AngularJS - Ivan Vučičević
AngularJS - Ivan Vučičević AngularJS - Ivan Vučičević
AngularJS - Ivan Vučičević Kruno Ris
 
Big Brother Hrvatska 2007 - Case Study - BizBuzz
Big Brother Hrvatska 2007 - Case Study - BizBuzzBig Brother Hrvatska 2007 - Case Study - BizBuzz
Big Brother Hrvatska 2007 - Case Study - BizBuzzwebburza
 

Ähnlich wie JavaCro'14 - Gatling – weapon in ranks of performance testing – Andrija Kranjec (20)

Panel diskusija - usporedba Web frameworka (IT Showoff)
Panel diskusija - usporedba Web frameworka (IT Showoff)Panel diskusija - usporedba Web frameworka (IT Showoff)
Panel diskusija - usporedba Web frameworka (IT Showoff)
 
Javantura Zagreb 2014 - Vert.x 1.3 - Mihovil Rister
Javantura Zagreb 2014 - Vert.x 1.3 - Mihovil RisterJavantura Zagreb 2014 - Vert.x 1.3 - Mihovil Rister
Javantura Zagreb 2014 - Vert.x 1.3 - Mihovil Rister
 
Vert.x - asinkroni skalabilni i poliglotni framework nove generacije
Vert.x - asinkroni skalabilni i poliglotni framework nove generacijeVert.x - asinkroni skalabilni i poliglotni framework nove generacije
Vert.x - asinkroni skalabilni i poliglotni framework nove generacije
 
Vert.x - Mihovil Rister, Javantura
Vert.x - Mihovil Rister, JavanturaVert.x - Mihovil Rister, Javantura
Vert.x - Mihovil Rister, Javantura
 
Zašto nam treba PaaS u Srcu?
Zašto nam treba PaaS u Srcu?Zašto nam treba PaaS u Srcu?
Zašto nam treba PaaS u Srcu?
 
GraphQL & Laravel - Efikasni API servisi
GraphQL & Laravel - Efikasni API servisiGraphQL & Laravel - Efikasni API servisi
GraphQL & Laravel - Efikasni API servisi
 
WebUG - Hibridne mobilne aplikacije
WebUG - Hibridne mobilne aplikacijeWebUG - Hibridne mobilne aplikacije
WebUG - Hibridne mobilne aplikacije
 
Web App Security for Devs
Web App Security for DevsWeb App Security for Devs
Web App Security for Devs
 
Web App Security for Devs
Web App Security for DevsWeb App Security for Devs
Web App Security for Devs
 
[TVZ računarstvo] Dinamičke web aplikacije, predavanje 10.
[TVZ računarstvo] Dinamičke web aplikacije, predavanje 10. [TVZ računarstvo] Dinamičke web aplikacije, predavanje 10.
[TVZ računarstvo] Dinamičke web aplikacije, predavanje 10.
 
[TVZ računarstvo] Dinamičke web aplikacije, predavanje 8.
[TVZ računarstvo] Dinamičke web aplikacije, predavanje 8. [TVZ računarstvo] Dinamičke web aplikacije, predavanje 8.
[TVZ računarstvo] Dinamičke web aplikacije, predavanje 8.
 
[TVZ računarstvo] Dinamičke web aplikacije, predavanje 9.
[TVZ računarstvo] Dinamičke web aplikacije, predavanje 9. [TVZ računarstvo] Dinamičke web aplikacije, predavanje 9.
[TVZ računarstvo] Dinamičke web aplikacije, predavanje 9.
 
Angular 2 and TypeScript - 2016 Dump Day
Angular 2 and TypeScript - 2016 Dump DayAngular 2 and TypeScript - 2016 Dump Day
Angular 2 and TypeScript - 2016 Dump Day
 
Mean Stack JavaCro 2014
Mean Stack JavaCro 2014Mean Stack JavaCro 2014
Mean Stack JavaCro 2014
 
AngularJS - Ivan Vučičević
AngularJS - Ivan Vučičević AngularJS - Ivan Vučičević
AngularJS - Ivan Vučičević
 
Big Brother Hrvatska 2007 - Case Study - BizBuzz
Big Brother Hrvatska 2007 - Case Study - BizBuzzBig Brother Hrvatska 2007 - Case Study - BizBuzz
Big Brother Hrvatska 2007 - Case Study - BizBuzz
 
Oblikovni obrasci
Oblikovni obrasciOblikovni obrasci
Oblikovni obrasci
 
Programski jezik java
Programski jezik javaProgramski jezik java
Programski jezik java
 
Programski jezik java
Programski jezik javaProgramski jezik java
Programski jezik java
 
Javantura Zagreb 2014 - Alfresco-Neo4j integracija - Damir Murat
Javantura Zagreb 2014 - Alfresco-Neo4j integracija - Damir MuratJavantura Zagreb 2014 - Alfresco-Neo4j integracija - Damir Murat
Javantura Zagreb 2014 - Alfresco-Neo4j integracija - Damir Murat
 

Mehr von HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association

Mehr von HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association (20)

Java cro'21 the best tools for java developers in 2021 - hujak
Java cro'21   the best tools for java developers in 2021 - hujakJava cro'21   the best tools for java developers in 2021 - hujak
Java cro'21 the best tools for java developers in 2021 - hujak
 
JavaCro'21 - Java is Here To Stay - HUJAK Keynote
JavaCro'21 - Java is Here To Stay - HUJAK KeynoteJavaCro'21 - Java is Here To Stay - HUJAK Keynote
JavaCro'21 - Java is Here To Stay - HUJAK Keynote
 
Javantura v7 - Behaviour Driven Development with Cucumber - Ivan Lozić
Javantura v7 - Behaviour Driven Development with Cucumber - Ivan LozićJavantura v7 - Behaviour Driven Development with Cucumber - Ivan Lozić
Javantura v7 - Behaviour Driven Development with Cucumber - Ivan Lozić
 
Javantura v7 - The State of Java - Today and Tomowwow - HUJAK's Community Key...
Javantura v7 - The State of Java - Today and Tomowwow - HUJAK's Community Key...Javantura v7 - The State of Java - Today and Tomowwow - HUJAK's Community Key...
Javantura v7 - The State of Java - Today and Tomowwow - HUJAK's Community Key...
 
Javantura v7 - Learning to Scale Yourself: The Journey from Coder to Leader -...
Javantura v7 - Learning to Scale Yourself: The Journey from Coder to Leader -...Javantura v7 - Learning to Scale Yourself: The Journey from Coder to Leader -...
Javantura v7 - Learning to Scale Yourself: The Journey from Coder to Leader -...
 
JavaCro'19 - The State of Java and Software Development in Croatia - Communit...
JavaCro'19 - The State of Java and Software Development in Croatia - Communit...JavaCro'19 - The State of Java and Software Development in Croatia - Communit...
JavaCro'19 - The State of Java and Software Development in Croatia - Communit...
 
Javantura v6 - Java in Croatia and HUJAK - Branko Mihaljević, Aleksander Radovan
Javantura v6 - Java in Croatia and HUJAK - Branko Mihaljević, Aleksander RadovanJavantura v6 - Java in Croatia and HUJAK - Branko Mihaljević, Aleksander Radovan
Javantura v6 - Java in Croatia and HUJAK - Branko Mihaljević, Aleksander Radovan
 
Javantura v6 - On the Aspects of Polyglot Programming and Memory Management i...
Javantura v6 - On the Aspects of Polyglot Programming and Memory Management i...Javantura v6 - On the Aspects of Polyglot Programming and Memory Management i...
Javantura v6 - On the Aspects of Polyglot Programming and Memory Management i...
 
Javantura v6 - Case Study: Marketplace App with Java and Hyperledger Fabric -...
Javantura v6 - Case Study: Marketplace App with Java and Hyperledger Fabric -...Javantura v6 - Case Study: Marketplace App with Java and Hyperledger Fabric -...
Javantura v6 - Case Study: Marketplace App with Java and Hyperledger Fabric -...
 
Javantura v6 - How to help customers report bugs accurately - Miroslav Čerkez...
Javantura v6 - How to help customers report bugs accurately - Miroslav Čerkez...Javantura v6 - How to help customers report bugs accurately - Miroslav Čerkez...
Javantura v6 - How to help customers report bugs accurately - Miroslav Čerkez...
 
Javantura v6 - When remote work really works - the secrets behind successful ...
Javantura v6 - When remote work really works - the secrets behind successful ...Javantura v6 - When remote work really works - the secrets behind successful ...
Javantura v6 - When remote work really works - the secrets behind successful ...
 
Javantura v6 - Kotlin-Java Interop - Matej Vidaković
Javantura v6 - Kotlin-Java Interop - Matej VidakovićJavantura v6 - Kotlin-Java Interop - Matej Vidaković
Javantura v6 - Kotlin-Java Interop - Matej Vidaković
 
Javantura v6 - Spring HATEOAS hypermedia-driven web services, and clients tha...
Javantura v6 - Spring HATEOAS hypermedia-driven web services, and clients tha...Javantura v6 - Spring HATEOAS hypermedia-driven web services, and clients tha...
Javantura v6 - Spring HATEOAS hypermedia-driven web services, and clients tha...
 
Javantura v6 - End to End Continuous Delivery of Microservices for Kubernetes...
Javantura v6 - End to End Continuous Delivery of Microservices for Kubernetes...Javantura v6 - End to End Continuous Delivery of Microservices for Kubernetes...
Javantura v6 - End to End Continuous Delivery of Microservices for Kubernetes...
 
Javantura v6 - Istio Service Mesh - The magic between your microservices - Ma...
Javantura v6 - Istio Service Mesh - The magic between your microservices - Ma...Javantura v6 - Istio Service Mesh - The magic between your microservices - Ma...
Javantura v6 - Istio Service Mesh - The magic between your microservices - Ma...
 
Javantura v6 - How can you improve the quality of your application - Ioannis ...
Javantura v6 - How can you improve the quality of your application - Ioannis ...Javantura v6 - How can you improve the quality of your application - Ioannis ...
Javantura v6 - How can you improve the quality of your application - Ioannis ...
 
Javantura v6 - Just say it v2 - Pavao Varela Petrac
Javantura v6 - Just say it v2 - Pavao Varela PetracJavantura v6 - Just say it v2 - Pavao Varela Petrac
Javantura v6 - Just say it v2 - Pavao Varela Petrac
 
Javantura v6 - Automation of web apps testing - Hrvoje Ruhek
Javantura v6 - Automation of web apps testing - Hrvoje RuhekJavantura v6 - Automation of web apps testing - Hrvoje Ruhek
Javantura v6 - Automation of web apps testing - Hrvoje Ruhek
 
Javantura v6 - Master the Concepts Behind the Java 10 Challenges and Eliminat...
Javantura v6 - Master the Concepts Behind the Java 10 Challenges and Eliminat...Javantura v6 - Master the Concepts Behind the Java 10 Challenges and Eliminat...
Javantura v6 - Master the Concepts Behind the Java 10 Challenges and Eliminat...
 
Javantura v6 - Building IoT Middleware with Microservices - Mario Kusek
Javantura v6 - Building IoT Middleware with Microservices - Mario KusekJavantura v6 - Building IoT Middleware with Microservices - Mario Kusek
Javantura v6 - Building IoT Middleware with Microservices - Mario Kusek
 

JavaCro'14 - Gatling – weapon in ranks of performance testing – Andrija Kranjec

  • 1. Oružje u redovimaOružje u redovima performansnog testiranja Andrija Kranjec
  • 2. Agenda • Što je Gatling? • Problemi kod alata za testiranje • Gatling kao rješenje • Demo• Demo • Testiranje JVM aplikacija
  • 3. Što je Gatling? Sliku ustupio Dean Sekulić (Croteam)
  • 4. Gatling je alat za simulaciju opterećenja na testiranoj aplikaciji, provodi pripadna mjerenja iprovodi pripadna mjerenja i prezentira rezultate provedenog performansnog testiranja.
  • 5. Još jedan u nizu alata
  • 6. Problemi kod alata za testiranjeProblemi kod alata za testiranje
  • 7. Cijena Photo by Siphiwe Sibeko / Reuters
  • 8. 1 dretva = 1 korisnik Photo by Alessandro Garofalo / Reuters
  • 9. Dretve čekaju… Photo by Larry Downing / Reuters
  • 10. …i spavaju. Photo by Stringer Shanghai / Reuters
  • 12. • Baziran na Actor Modelu • Asinkron • Koristi Non-Blocking algoritme Gatling kao rješenje • Koristi Non-Blocking algoritme
  • 13. Lako pisanje testova*Lako pisanje testova* *pod uvjetom da ste programer
  • 14. Testovi se pišu korištenjem Gatling DSL-a koji je implementiran u Scala programskom jeziku.
  • 15. Definiranje scenarija - opisuju ponašanja virtualnih korisnika scenario exec / group / pause / pauseExp / pauseCustom doIf / doIfOrElse / randomSwitch / roundRobinSwitch repeat / during / asLongAs / foreach tryMax / exitBlockOnFail / exitHereIfFailed Definiranje feedera - ubacivanje podataka u scenarij csv / tsv / ssv / jdbc / redisFeeder Gatling DSL csv / tsv / ssv / jdbc / redisFeeder queue / random / circular Konfiguracija scenarija - manipulacija izvršavanja users / ramp / delay / protocolConfig HTTP akcije - upravljanje HTTP zahtjevima http get / post / put / delete / head queryParam / header / headers / basicAuth body / fileBody / byteArrayBody / param / upload
  • 16. Provjere - provjera sadržaja odgovora check status / currentLocation / header / headerRegex / responseTimeInMillis / latencyInMillis regex / xpath / jsonPath / css / md5 / sha1 find / findAll / count transform is / not / exists / notExists / in / whatever saveAs HTTP konfiguracija – upravljanje Gatlingovim HTTP klijentom Gatling DSL HTTP konfiguracija – upravljanje Gatlingovim HTTP klijentom httpconfig baseURL / baseURLs / proxy / httpsPort / credentials acceptHeader / acceptCharsetHeader / acceptEncodingHeader / acceptLanguageHeader / hostHeader / userAgentHeader disableFollowRedirect / disableAutomaticReferer / disableWarmUp / warmUp requestInfoExtractor / responseInfoExtractor / disableResponseChunksDiscarding
  • 17. Assertions – postavljanje nefunkcionalnih zahtjeva na razini scenarija assertThat global / details responseTime / allRequests / failedRequests / successfulRequests /requestsPerSec min / max / mean / stdDev / percentiles1 / percentiles2 percent / count lessThan / greaterThan / between / is / in / assert Gatling DSL
  • 19. Recikliraj stare testove Photo by Stringer Shanghai / Reuters
  • 20. Nema izlike za sistemaše...Nema izlike za sistemaše...
  • 23.
  • 26. Opteretili smo aplikaciju, a što dalje?Opteretili smo aplikaciju, a što dalje?
  • 27. Monitoring JVM aplikacije • CPU • Heap memorija • Garbage collector rate • Thread pool • Webcontainer pool• Webcontainer pool • JDBC (time, connection pool,..) • Prepare statement cache • Response time portleta/servleta
  • 28. Demo - rezultatiDemo - rezultati