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.

Load Testing & Apache JMeter

2,463 views

Published on

Published in: Technology

Load Testing & Apache JMeter

  1. 1. Load Testing &Apache JMeterChuck HillGlobal Village Consulting, Inc.WOWODC 2010
  2. 2. What, Why, How?• Why?• What?• When?• Where?• How?
  3. 3. Planning for Load Testing• Time• Tools• Equipment• Information• Lots of data
  4. 4. JMeter Components
  5. 5. HTTP Cookie Manager
  6. 6. HTTP Request Defaults
  7. 7. Thread Group
  8. 8. Sampler
  9. 9. Listeners
  10. 10. Timers
  11. 11. Assertions
  12. 12. Test Parameterization• Parameterize for • different environments • different scenarios • different data• Start Early!
  13. 13. Parameters on Test Plan
  14. 14. Thread Group Parameters
  15. 15. Thread GroupSpecific Parameters
  16. 16. Complications of WOe• URL is recorded in Sampler so... ‣ Session ID and Instance Number ➡HTTP Cookie Manager ‣ Context ID ➡A problem, but only in loops
  17. 17. Session ID andInstance Number
  18. 18. Use Matches in URL
  19. 19. Find Context ID
  20. 20. Use Context ID
  21. 21. Recording Tests• Record and refine• Use Selenium for repeatability• Run tests slowly
  22. 22. Recording Problems• ERXSwitchComponent -Der.extensions.WOSwitchComponent.patch=false• Copy and Paste to Test Plan
  23. 23. Delays for Reality• Pause for realistic results• Constant Timer• Gaussion Random Timer• Uniform Random Timer• Combinations of Timers
  24. 24. Ajax!• The good news...• The bad news... • XPath Extractor • JavaScript• AjaxUpdateContainer and friends
  25. 25. Data Driven Tests
  26. 26. Upload Problem
  27. 27. Running the Tests• Run from GUI• Run from command line / script• Run from multiple machines
  28. 28. Evaluating Test Results• JMeter Reporters (Listeners) • response times: min, max, avg, std dev • error count• ActivityMonitor.app & ServerAdmin.app • memory, CPU, network• JavaMonitor • Transaction Average, Average Idle Period
  29. 29. Summary Report
  30. 30. Creating Effective Tests• Work as super-user• Use Selenium tests as base• Run against known DB backup• Parameterize tests• Use assertions
  31. 31. Creating Readable Tests
  32. 32. Q&ALoad Testing and Apache JMeterChuck HillGlobal Village Consulting

×