Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Gatling.io - load testing made easy!

Gatling.io - load testing made easy!

Continuous web performance testing made easy with gatling.
#t3cs15

96ca2af44f81a79c6d041fa4ee45d8b1?s=128

Daniel Lienert

May 09, 2015
Tweet

Transcript

  1. Gatling STRESS  TOOL   Automatic load testing made easy!

  2. Daniel Lienert Softwarearchitekt / ScrumMaster @ punkt.de Twitter: @dlienert Web:

    daniel.lienert.cc
  3. An extra 500 millisecods in search page generation time dropped

    traffic by 20%. Every 100 millisecods of latency costs 1% in sales.
  4. Teststack Unit Tests class  ProcessorTest  extends  UnitTestCase  {    

     /**  @test  */    public  func0on  process()  {      ...    }  }   Functional Tests class  ProcessorTest  extends  Func<onalTestCase  {      /**  @test  */    public  func0on  process()  {      ...    }  }   Acceptance Tests Feature:      In  order  to  sell  products      as  a  store  employee      I  want  to  use  the  sales  app     ....   Performance Tests jMeter??
  5. jMeter

  6. •  Written in Scala •  NonBlocking IO / Asynchronous – 

    Less Resourcen / better performance then jMeter •  Testcases written in Scala DSL gatling.io   Gatling
  7. Teststack Unit Tests class  ProcessorTest  extends  UnitTestCase  {    

     /**  @test  */    public  func0on  process()  {      ...    }  }   Functional Tests class  ProcessorTest  extends  Func<onalTestCase  {      /**  @test  */    public  func0on  process()  {      ...    }  }   Acceptance Tests Feature:      In  order  to  sell  products      as  a  store  employee      I  want  to  use  the  sales  app     ....   Performance Tests class  PerformanceTest  extends  Simula<on  {   val  scnHome  =  scenario("Show  the  homepage“)              .exec(hKp("Homepage").get("/index.php"))  
  8. Show me CODE!

  9. None
  10. None
  11. None
  12. None
  13. None
  14. None
  15. None
  16. Injection Profiles Injection Profiles –  nothingFor –  atOnceUsers –  rampUsers

    –  constantUsersPerSec –  rampUsersPerSec –  splitUsers –  heavisideUsers
  17. Loops Loop Types –  forever –  repeat –  during – 

    asLongAs –  foreach
  18. Feeder Feeder Types – csv, tsv, ssv – jsonFile, jsonUrl – jdbcFeeder – redisFeeder

    Feeder Strategies – queue – random – circular
  19. Assertions Scopes –  global –  forAll –  details Conditions – 

    lessThan –  greaterThan –  between –  is –  in Statistics –  responseTime –  allRequests –  failedRequests –  successfulRequests –  requestsPerSec
  20. Checks Header & Request –  status –  currentLocation –  header

    –  headerRegex –  responseTimeInMillis –  latencyInMillis Body –  bodyString –  bodyBytes –  substring –  regex –  xpath –  jsonPath, jsonpJsonPath –  css
  21. Application Control Body Manipulation –  body –  bodyPart –  formParam

    –  multivaluedFormParam –  formParamsMap –  formUpload
  22. ... or record ...

  23. Launch

  24. Launch bin/gatling.sh \! -df Data/ \! -sf Tests/Performance/Simulations/ \! -rf

    Tests/Performance/Reports/ \! -s typo3Project.performanceTest!
  25. ---- Show the homepage ---------------------------------------------------------! [##########################################################################]100%! waiting: 0 / active:

    0 / done:1! ---- Requests ------------------------------------------------------------------! > Global (OK=1 KO=0 )! > Homepage (OK=1 KO=0 )! ================================================================================! ! Simulation finished! Parsing log file(s)...! Parsing log file(s) done! Generating reports...! ! ================================================================================! ---- Global Information --------------------------------------------------------! > request count 1 (OK=1 KO=0 )! > min response time 462 (OK=462 KO=- )! > max response time 462 (OK=462 KO=- )! > mean response time 462 (OK=462 KO=- )! > std deviation 0 (OK=0 KO=- )! > response time 50th percentile 462 (OK=462 KO=- )! > response time 75th percentile 462 (OK=462 KO=- )! > mean requests/sec 1.821 (OK=1.821 KO=- )! ---- Response Time Distribution ------------------------------------------------! > t < 800 ms 1 (100%)! > 800 ms < t < 1200 ms 0 ( 0%)! > t > 1200 ms 0 ( 0%)! > failed 0 ( 0%)! ================================================================================!
  26. Executive Summary

  27. Testrunner •  Maven •  SBT (Scala Build Tool) TYPO3  Flow

     Command     Test Folders Flow Gatling Command Jenkins Statistics Report
  28. None
  29. QUESTIONS  ?   Feedback:  @dlienert  

  30. Resources •  gatling.io •  dashing.io •  jenkins-ci.org