Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

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

Non-functional testing is an important, but often ignored step in the process of developing applications. Gatling is a tool that enables us to simulate load, performs the associated measurement and presents the results of the performance testing. Why is Gatling detected by the ThoughtWorks radar? Because it is based on Akka, Netty and Scala technologies and so this lecture will show that writing performance scripts don’t have to be boring. With the concept and methodology of performance testing, using Gatling, the author will present personal experiences from previous projects testing the JVM applications.

Related Books

Free with a 30 day trial from Scribd

See all
  • Login to see the comments

  • Be the first to like this

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

  1. 1. Oružje u redovimaOružje u redovima performansnog testiranja Andrija Kranjec
  2. 2. Agenda • Što je Gatling? • Problemi kod alata za testiranje • Gatling kao rješenje • Demo• Demo • Testiranje JVM aplikacija
  3. 3. Što je Gatling? Sliku ustupio Dean Sekulić (Croteam)
  4. 4. Gatling je alat za simulaciju opterećenja na testiranoj aplikaciji, provodi pripadna mjerenja iprovodi pripadna mjerenja i prezentira rezultate provedenog performansnog testiranja.
  5. 5. Još jedan u nizu alata
  6. 6. Problemi kod alata za testiranjeProblemi kod alata za testiranje
  7. 7. Cijena Photo by Siphiwe Sibeko / Reuters
  8. 8. 1 dretva = 1 korisnik Photo by Alessandro Garofalo / Reuters
  9. 9. Dretve čekaju… Photo by Larry Downing / Reuters
  10. 10. …i spavaju. Photo by Stringer Shanghai / Reuters
  11. 11. Komplicirano sučelje Photo by Ben Cooper
  12. 12. • Baziran na Actor Modelu • Asinkron • Koristi Non-Blocking algoritme Gatling kao rješenje • Koristi Non-Blocking algoritme
  13. 13. Lako pisanje testova*Lako pisanje testova* *pod uvjetom da ste programer
  14. 14. Testovi se pišu korištenjem Gatling DSL-a koji je implementiran u Scala programskom jeziku.
  15. 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. 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. 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
  18. 18. Napiši jednomNapiši jednom
  19. 19. Recikliraj stare testove Photo by Stringer Shanghai / Reuters
  20. 20. Nema izlike za sistemaše...Nema izlike za sistemaše...
  21. 21. …postoji recorder.
  22. 22. Izvještaji
  23. 23. DemoDemo
  24. 24. Planirajte opterećenje Izvor http://www.zadarskilist.hr/
  25. 25. Opteretili smo aplikaciju, a što dalje?Opteretili smo aplikaciju, a što dalje?
  26. 26. 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
  27. 27. Demo - rezultatiDemo - rezultati
  28. 28. Pitanja?

×