You are previewing JMeter Cookbook.
O'Reilly logo
JMeter Cookbook

Book Description

70 insightful and practical recipes to help you successfully use Apache JMeter

In Detail

Performance testing is critical to the success of any software product launch and continued scalability. No matter the size of the user base of an application, it is crucial to deliver the best user experience to consumers. Apache JMeter is an excellent testing tool that provides an insight on how applications might behave under load, allowing organizations to focus on making adequate preparations for the delivery of quality, robust, and foolproof applications to stakeholders.

This hands-on guide will equip you with the all the skills you need to effectively use JMeter to test web applications and supporting services. With over 50 carefully selected recipes, you will learn how to take full advantage of JMeter for all your testing needs, overcome any challenges you face, and optimize the knowledge you already have.

What You Will Learn

  • Numerous ways to record test plans or handcraft them from scratch
  • Successfully test supporting application services and resources such as RESTful, SOAP, JMS, FTP, and data stores
  • Effectively monitor application and infrastructure resources during a performance test
  • Use existing cloud services for distributed testing and rolling your own cloud infrastructure when needed
  • Develop custom JMeter plugins from scratch and use existing ones to extend JMeter's functionality
  • Deliver quality products by successfully integrating JMeter into your continuous delivery workflow
  • Tune JMeter for better overall performance
  • Build realistic, comprehensive, and maintainable test plans
  • Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.

    Table of Contents

    1. JMeter Cookbook
      1. Table of Contents
      2. JMeter Cookbook
      3. Credits
      4. About the Author
      5. About the Reviewers
      6. www.PacktPub.com
        1. Support files, eBooks, discount offers, and more
          1. Why Subscribe?
          2. Free Access for Packt account holders
      7. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Conventions
        5. Reader feedback
        6. Customer support
          1. Downloading the example code
          2. Errata
          3. Piracy
          4. Questions
      8. 1. JMeter Fundamentals
        1. Introduction
        2. Executing a test script
          1. How to do it…
          2. How it works…
          3. There's more…
            1. An example of running in non-GUI mode
        3. Recording a script via HTTP(S) Test Script Recorder
          1. How to do it…
          2. How it works…
          3. There's more…
            1. Changing the machine system settings
          4. See also
        4. Recording scripts via the Chrome browser extension
          1. How to do it…
          2. How it works…
          3. There's more…
        5. Converting HTTP web archives (HAR) to JMeter test plans
          1. How to do it…
          2. How it works…
          3. There's more…
        6. Viewing and analyzing test results
          1. How to do it…
          2. How it works…
          3. There's more…
        7. Feeding data into a script
          1. How to do it…
          2. How it works…
          3. There's more…
        8. Using timers
          1. How to do it…
          2. How it works…
          3. There's more…
        9. Managing HTTP user sessions
          1. How to do it…
          2. How it works…
          3. There's more…
        10. Testing Single Page Applications (SPAs)
          1. How to do it…
          2. How it works…
          3. There's more…
        11. Testing AJAX-centric applications
          1. How to do it…
          2. How it works…
          3. There's more...
      9. 2. Handling Responses
        1. Introduction
        2. Using Regular Expression Extractor
          1. How to do it…
          2. How it works…
          3. There's more…
        3. Using Regular Expression Tester
          1. How to do it…
          2. How it works…
          3. There's more…
        4. Using CSS/jQuery Extractor
          1. How to do it…
          2. How it works…
          3. There's more…
        5. Using XPath Extractor
          1. How to do it…
          2. How it works…
          3. There's more…
        6. Dealing with file downloads
          1. How to do it…
          2. How it works…
          3. There's more…
        7. Handling XML responses
          1. How to do it…
          2. How it works…
          3. There's more…
        8. Handling JSON responses
          1. How to do it…
          2. How it works…
          3. There's more…
        9. Handling HTML responses
          1. How to do it…
          2. How it works…
          3. There's more…
          4. See also
        10. Using Response Assertion
          1. How to do it…
          2. How it works…
          3. There's more…
        11. Using Duration Assertion
          1. How to do it…
          2. How it works…
          3. There's more…
        12. Uploading files with your scripts
          1. How to do it…
          2. How it works…
          3. There's more…
      10. 3. Building Robust Test Plans with Controllers
        1. Introduction
        2. Using Transaction Controller in test plans
          1. How to do it…
          2. How it works…
          3. There's more…
        3. Using Loop Controller in test plans
          1. How to do it…
          2. How it works…
          3. There's more…
          4. See also
        4. Leveraging ForEach Controller in test plans
          1. How to do it…
          2. How it works…
          3. There's more…
          4. See also
        5. Using Interleave and Random Controller in test plans
          1. How to do it…
          2. How it works…
          3. There's more…
        6. Using Runtime Controller in test plans
          1. How to do it…
          2. How it works…
          3. There's more…
      11. 4. Testing Services
        1. Introduction
        2. Testing REST web services
          1. How to do it…
          2. How it works…
          3. There's more…
          4. See also
        3. Testing SOAP web services
          1. How to do it…
          2. How it works…
          3. There's more…
          4. See also
        4. Testing FTP services
          1. How to do it…
          2. How it works…
          3. There's more…
        5. Testing relational databases
          1. How to do it…
          2. How it works…
          3. There's more…
        6. Testing NoSQL databases
          1. How to do it…
          2. How it works…
          3. There's more…
          4. See also
        7. Testing JMS services
          1. How to do it…
          2. How it works…
          3. There's more…
          4. See also
      12. 5. Diving into Distributed Testing
        1. Introduction
        2. Testing applications with JMeter's master-slave setup
          1. How to do it…
          2. How it works…
          3. There's more…
          4. See also
        3. Testing internal applications using JMeter and Vagrant
          1. How to do it…
          2. How it works…
          3. There's more...
        4. Testing external facing applications using JMeter, Vagrant, and AWS
          1. How to do it…
          2. How it works…
          3. There's more…
        5. Testing external facing applications using Flood.IO
          1. How to do it…
          2. How it works…
          3. There's more…
          4. See also
        6. Testing external facing applications using BlazeMeter
          1. How to do it…
          2. How it works…
          3. There's more…
          4. See also
      13. 6. Extending JMeter
        1. Introduction
        2. Using REST Sampler
          1. How to do it…
          2. How it works…
          3. There's more…
          4. See also
        3. Using Ultimate Thread Group
          1. How to do it…
          2. How it works…
          3. See also
        4. Using Throughput Shaping Timer
          1. How to do it…
          2. How it works…
          3. See also
        5. Using Console Status Logger
          1. How to do it…
          2. How it works…
        6. Using Dummy Sampler
          1. How to do it…
          2. How it works…
          3. There's more…
        7. Developing custom JMeter plugins
          1. How to do it…
          2. How it works…
          3. There's more…
          4. See also
        8. Testing WebSocket-enabled applications
          1. How to do it…
          2. How it works…
          3. There's more…
          4. See also
      14. 7. Building, Debugging, and Analyzing the Results of Test Plans
        1. Introduction
        2. Using the View Results Tree listener
          1. How to do it…
          2. How it works…
          3. There's more…
          4. See also
        3. Using the Aggregate Report listener
          1. How to do it…
          2. How it works…
          3. See also
        4. Debugging with Debug Sampler
          1. How to do it…
          2. How it works…
        5. Using Constant Throughput Timer
          1. How to do it…
          2. How it works…
          3. See also
        6. Using the JSR223 postprocessor
          1. How to do it…
          2. How it works…
          3. See also
        7. Analyzing Response Times Over Time
          1. How to do it…
          2. How it works…
        8. Analyzing transactions per second
          1. How to do it…
          2. How it works…
        9. Using User Defined Variables (UDV)
          1. How to do it…
          2. How it works…
      15. 8. Beyond the Basics
        1. Introduction
        2. Continuous Integration with JMeter
          1. How to do it…
          2. How it works…
          3. There's more…
          4. See also
        3. Testing with different bandwidths
          1. How to do it…
          2. How it works…
          3. See also:
        4. Using the HTTP Cache Manager component
          1. How to do it…
          2. How it works…
          3. See also
        5. Using script languages within test plans
          1. How to do it…
          2. How it works…
          3. See also
        6. Writing Test scripts through Ruby DSL
          1. How to do it…
          2. How it works…
          3. There's more…
        7. Understanding JMeter properties
          1. How to do it…
          2. How it works…
          3. See also
        8. Monitoring servers while executing tests (using VisualVM)
          1. How to do it…
          2. How it works…
          3. There's more…
        9. Monitoring servers while executing tests (using YourKit Profiler)
          1. How to do it…
          2. How it works…
          3. There's more…
        10. Monitoring servers while executing tests (using New Relic)
          1. How to do it…
          2. How it works…
          3. There's more...
          4. See also
        11. Performance tips to scale JMeter
          1. How to do it…
          2. How it works…
          3. See also
      16. A. Installing the Supporting Software Needed for this Book
        1. Introduction
        2. Installing JMeter
          1. One line install
        3. Installing Java Development Kit (JDK)
          1. See also
        4. Installing JMeter plugins
          1. One line install
          2. See also
        5. Installing Vagrant
          1. See also
        6. Installing VirtualBox
          1. See also
        7. Installing Maven
        8. Installing Git
        9. Obtaining AWS keys for EC2
          1. See also
      17. Index