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.

Apache JMeter - A Brief Introduction


Published on

A very brief introduction to web application load/stress testing with Apache JMeter

Published in: Technology

Apache JMeter - A Brief Introduction

  1. 1. (c) 2010 A Really Really Really Basic Introduction into Load & Stress Testing with Apache JMeter
  2. 2. (c) 2010 Performance, Load and Stress Testing Objectives Performance Find bottlenecks, and establish a baseline for the system operational load Load Profile the system's behavior under the top load it was designed to work under Stress Attempt to break the system by overwhelming its resources
  3. 3. (c) 2010 All of the above (and more) “Apache JMeter is an open source 100% pure Java desktop application designed to load test functional behavior and measure performance. It was originally designed for testing Web Applications but has since expanded to other test functions.” Source:
  4. 4. (c) 2010 Let’s get started Download JMeter from Apache Website  s/downloads_jmeter.cgi For *nix systems: For Windows: .tgz archive .zip archive Extract archive into a local directory Navigate to jakarta-jmeter-2.*.*bin directory Launch JMeter GUI (make sure that Java is installed on your computer..) jmeter.bat (Windows)  (*nix)
  5. 5. (c) 2010 JMeter on Windows
  6. 6. (c) 2010 Apache JMeter GUI
  7. 7. (c) 2010 Add a Thread Group
  8. 8. (c) 2010 Meet your testers • 100 simultaneous users • activated at the rate 10 per second • runs only once
  9. 9. (c) 2010 Sampling – what? Samplers describe your test target – what, where and how. HTTP Request access web site over – what else – HTTP !
  10. 10. (c) 2010 An HTTP Request There are quite a few options to be configured… For this basic introduction let’s keep things simple
  11. 11. (c) 2010 Filling in the blanks At the very least, you need to supply the following: • URL for the website you are going to test • Port # - default is 80 (and you may leave it blank) • the page/directory to send request to (“/” stands for root)
  12. 12. (c) 2010 Can I run my tests now? As a matter of fact – you can! The catch? You would not get any results back. You need to add a LISTENER to display the information you'll be getting back
  13. 13. (c) 2010 Adding a Listener Summary Report is one of the most basic ones; it displays data in a table format
  14. 14. (c) 2010 A Summary Report: what you see is what you get Nothing to configure here, though you might want to supply a file name to where the results of the test might be saved. By default, the file will be written to jakarta-jmeter-2.*.*bin directory; use the browse button to specify different location NB: if file does not exist already, JMeter will pop up an error message: “Could not open the file”. Ignore it, the file will be created in the specified directory after first run
  15. 15. (c) 2010 Save your test plan Before you run your test you have to save the configuration; it is saved into a file with JMX extension
  16. 16. (c) 2010 Run the test, sit back and observe results! After running your test several times, you’ll notice that historic results begin to accumulate in the table. To clear the slate use Run > Clear menu option (or press CtrlShift-E)
  17. 17. (c) 2010 Making (some) sense out of the results • you’ve run total of 100 samples – HTTP requests to • average response time – 920 milliseconds • min, max and standard deviation values are also provided • on average you’ve received 89698.6 bytes per page • no errors – page faults testing with same parameters yield 23 milliseconds average response time, with 10 times less data transfer
  18. 18. (c) 2010 Just Scratching the Surface! What this really, really, really basic introduction did not cover? Why, everything else!
  19. 19. all rights reserved (c) 2010 Next steps There are 20+ samplers, 15+ listeners, pre- and post-processors, assertions, timers, schedulers as well as several configuration options for each. (And we haven’t even touched the Workbench!... ) Get more of JMeter on:
  20. 20. all rights reserved (c) 2010 Your feedback is always welcome at: