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.

QA. Load Testing

251 views

Published on

Overview of load testing process using Apache JMeter

Published in: Internet
  • Be the first to comment

QA. Load Testing

  1. 1. Load Testing Why we need it? What tools to use?
  2. 2. Load Testing Goals - Checking maximum simultaneous requests (Determining infrastructure limits) - Verifying acceptance of response time during high load - Verifying system stability under load - look for memory leaks in long tests - Predict future resource needs and architectural improvements - Verifying system behaviour after high load - Evaluating current capacity against defined requirements More reasons are listed at http://performance-testing.org/performance-testing-reasons
  3. 3. Open Source Tools - JMeter - Yandex Tank - Taurus
  4. 4. JMeterThe Apache JMeter™ application is open source software, a 100% pure Java application
  5. 5. Steps to start load testing 1)Launch application (jmeter.sh for Unix-based systems and jmeter.bat for Windows) 2)Right-button click on Test Plan and select Add > Threads (Users) > Thread group (preferably jp@gc - Ultimate Thread Group) 3)Configure Start Thread Count (amount of virtual users which will load your website), Startup Time (time for reaching amount of VU defined), Hold Load For (time for holding peak amount of VU defined), Shutdown Time (time for decreasing VUs by stopping requests)
  6. 6. JMeter - Step 2 - Select Ultimate Thread Group
  7. 7. JMeter - Step 3 - Thread’s configuration
  8. 8. Steps to start load testing (part 2) 4) Right-button click on Thread and select Add > Config Element > HTTP Request Default 5) Configure Server Name or IP (e.g. youwebsite.com or 123.231.321.123), Port Number (e.g. 80) and Protocol (http or https)
  9. 9. JMeter - Step 4 - select HTTP Request Defaults
  10. 10. JMeter - Step 5 - Configure HTTP Request Defaults
  11. 11. Steps to start load testing (part 3) 6) Right-button click on Thread and select Add > Sampler > HTTP Request 7) Configure Path (link to page you would like to test; e.g. /login.php or /blog/about) and specify Method GET
  12. 12. JMeter - Step 6 - Select Sampler HTTP Request
  13. 13. JMeter - Step 7 - Configure Sampler HTTP Request
  14. 14. Steps to start load testing (part 4) 8) Right-button click on Thread and select Add > Listener > jp@gc - Hits per Second Add > Listener > jp@gc - Response Times vs Threads Add > Listener > jp@gc - Response Latencies Over Time Add > Listener > jp@gc - Response Codes per Second 9) Finally… Run test plan by clicking on Start
  15. 15. JMeter - Step 8 - Configure Sampler HTTP Request
  16. 16. JMeter - 30 VUs - Hits per second
  17. 17. JMeter - 30 VUs - Response Time Over Time
  18. 18. JMeter - 30 VUs - Latencies Over Time
  19. 19. JMeter - 30 VUs - Response Codes per Second
  20. 20. Notes User “Run” > “Clear All” before starting new test Once you identified the issue with server responses try to decrease Start Threads Count and increase Startup Time to get to accurate value of allowed concurrent connections
  21. 21. IssuesHow to identify issues with JMeter
  22. 22. JMeter - 50 VUs - 500 Response codes
  23. 23. Server is down...
  24. 24. Really down...
  25. 25. Short term solutions Restart Servers Tune configuration of web servers Add more servers
  26. 26. Long term solutions Consider moving infrastructure to the Cloud Use CDN Use different domains for static resources (and fast web servers for them; e.g. Ngnix or lighttpd) Use memcached for storing mostly used DB queries Use downstream cacheability headers Consider moving part of the application logic to microservices Setup auto-scale at your Cloud provider
  27. 27. Cloud Solutions
  28. 28. Only JMeter?What other tools can be used for load testing?
  29. 29. Load Testing Tools - JMeter - Yandex.Tank - Gatling - Locust - Taurus - The Grinder Find more at http://alternativeto.net/
  30. 30. Commercial Solutions
  31. 31. Popular Commercial Solutions SOASTA https://www.soasta.com/ BlazeMeter https://www.blazemeter.com/
  32. 32. What Else? (topics for future slides)
  33. 33. Topics related to Load Testing - Functional Tests in JMeter (using runnable JAR files to automate functional and load testing) - PDF Reporting. BlazeMeter Sense (former Loadosophia) - Response Data validation - Continuous Load Testing. Configuring CI with headless JMeter - Configuration of Master / Slave nodes to perform load testing using multiple workstations
  34. 34. Thank youQuestions?

×