JMeter Cookbook

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

JMeter Cookbook

Cookbook
Bayo Erinle

70 insightful and practical recipes to help you successfully use Apache JMeter
$26.99
$44.99
RRP $26.99
RRP $44.99
eBook
Print + eBook
$12.99 p/month

Get Access

Get Unlimited Access to every Packt eBook and Video course

Enjoy full and instant access to over 3000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

Book Details

ISBN 139781783988280
Paperback228 pages

About This Book

  • Leverage existing cloud services for distributed testing and learn to employ your own cloud infrastructure when needed
  • Successfully integrate JMeter into your continuous delivery workflow allowing you to deliver high quality products
  • Test application supporting services and resources including RESTful, SOAP, JMS, FTP and Database

Who This Book Is For

This book is great for you if you are a developer, quality assurance engineer, tester, or test manager who is looking to get a firmer grasp of elementary, deep, and advanced testing concepts using Apache JMeter. It’s assumed you have access to a computer and an Internet connection. No prior testing or programming experience is required, but would be helpful.

Table of Contents

Chapter 1: JMeter Fundamentals
Introduction
Executing a test script
Recording a script via HTTP(S) Test Script Recorder
Recording scripts via the Chrome browser extension
Converting HTTP web archives (HAR) to JMeter test plans
Viewing and analyzing test results
Feeding data into a script
Using timers
Managing HTTP user sessions
Testing Single Page Applications (SPAs)
Testing AJAX-centric applications
Chapter 2: Handling Responses
Introduction
Using Regular Expression Extractor
Using Regular Expression Tester
Using CSS/jQuery Extractor
Using XPath Extractor
Dealing with file downloads
Handling XML responses
Handling JSON responses
Handling HTML responses
Using Response Assertion
Using Duration Assertion
Uploading files with your scripts
Chapter 3: Building Robust Test Plans with Controllers
Introduction
Using Transaction Controller in test plans
Using Loop Controller in test plans
Leveraging ForEach Controller in test plans
Using Interleave and Random Controller in test plans
Using Runtime Controller in test plans
Chapter 4: Testing Services
Introduction
Testing REST web services
Testing SOAP web services
Testing FTP services
Testing relational databases
Testing NoSQL databases
Testing JMS services
Chapter 5: Diving into Distributed Testing
Introduction
Testing applications with JMeter's master-slave setup
Testing internal applications using JMeter and Vagrant
Testing external facing applications using JMeter, Vagrant, and AWS
Testing external facing applications using Flood.IO
Testing external facing applications using BlazeMeter
Chapter 6: Extending JMeter
Introduction
Using REST Sampler
Using Ultimate Thread Group
Using Throughput Shaping Timer
Using Console Status Logger
Using Dummy Sampler
Developing custom JMeter plugins
Testing WebSocket-enabled applications
Chapter 7: Building, Debugging, and Analyzing the Results of Test Plans
Introduction
Using the View Results Tree listener
Using the Aggregate Report listener
Debugging with Debug Sampler
Using Constant Throughput Timer
Using the JSR223 postprocessor
Analyzing Response Times Over Time
Analyzing transactions per second
Using User Defined Variables (UDV)
Chapter 8: Beyond the Basics
Introduction
Continuous Integration with JMeter
Testing with different bandwidths
Using the HTTP Cache Manager component
Using script languages within test plans
Writing Test scripts through Ruby DSL
Understanding JMeter properties
Monitoring servers while executing tests (using VisualVM)
Monitoring servers while executing tests (using YourKit Profiler)
Monitoring servers while executing tests (using New Relic)
Performance tips to scale JMeter

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

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.

Authors

Table of Contents

Chapter 1: JMeter Fundamentals
Introduction
Executing a test script
Recording a script via HTTP(S) Test Script Recorder
Recording scripts via the Chrome browser extension
Converting HTTP web archives (HAR) to JMeter test plans
Viewing and analyzing test results
Feeding data into a script
Using timers
Managing HTTP user sessions
Testing Single Page Applications (SPAs)
Testing AJAX-centric applications
Chapter 2: Handling Responses
Introduction
Using Regular Expression Extractor
Using Regular Expression Tester
Using CSS/jQuery Extractor
Using XPath Extractor
Dealing with file downloads
Handling XML responses
Handling JSON responses
Handling HTML responses
Using Response Assertion
Using Duration Assertion
Uploading files with your scripts
Chapter 3: Building Robust Test Plans with Controllers
Introduction
Using Transaction Controller in test plans
Using Loop Controller in test plans
Leveraging ForEach Controller in test plans
Using Interleave and Random Controller in test plans
Using Runtime Controller in test plans
Chapter 4: Testing Services
Introduction
Testing REST web services
Testing SOAP web services
Testing FTP services
Testing relational databases
Testing NoSQL databases
Testing JMS services
Chapter 5: Diving into Distributed Testing
Introduction
Testing applications with JMeter's master-slave setup
Testing internal applications using JMeter and Vagrant
Testing external facing applications using JMeter, Vagrant, and AWS
Testing external facing applications using Flood.IO
Testing external facing applications using BlazeMeter
Chapter 6: Extending JMeter
Introduction
Using REST Sampler
Using Ultimate Thread Group
Using Throughput Shaping Timer
Using Console Status Logger
Using Dummy Sampler
Developing custom JMeter plugins
Testing WebSocket-enabled applications
Chapter 7: Building, Debugging, and Analyzing the Results of Test Plans
Introduction
Using the View Results Tree listener
Using the Aggregate Report listener
Debugging with Debug Sampler
Using Constant Throughput Timer
Using the JSR223 postprocessor
Analyzing Response Times Over Time
Analyzing transactions per second
Using User Defined Variables (UDV)
Chapter 8: Beyond the Basics
Introduction
Continuous Integration with JMeter
Testing with different bandwidths
Using the HTTP Cache Manager component
Using script languages within test plans
Writing Test scripts through Ruby DSL
Understanding JMeter properties
Monitoring servers while executing tests (using VisualVM)
Monitoring servers while executing tests (using YourKit Profiler)
Monitoring servers while executing tests (using New Relic)
Performance tips to scale JMeter

Book Details

ISBN 139781783988280
Paperback228 pages
Read More