Book Image

Performance Testing with JMeter 3 - Third Edition

By : Bayo Erinle
Book Image

Performance Testing with JMeter 3 - Third Edition

By: Bayo Erinle

Overview of this book

JMeter is a Java application designed to load and test performance for web application. JMeter extends to improve the functioning of various other static and dynamic resources. This book is a great starting point to learn about JMeter. It covers the new features introduced with JMeter 3 and enables you to dive deep into the new techniques needed for measuring your website performance. The book starts with the basics of performance testing and guides you through recording your first test scenario, before diving deeper into JMeter. You will also learn how to configure JMeter and browsers to help record test plans. Moving on, you will learn how to capture form submission in JMeter, dive into managing sessions with JMeter and see how to leverage some of the components provided by JMeter to handle web application HTTP sessions. You will also learn how JMeter can help monitor tests in real-time. Further, you will go in depth into distributed testing and see how to leverage the capabilities of JMeter to accomplish this. You will get acquainted with some tips and best practices with regard to performance testing. By the end of the book, you will have learned how to take full advantage of the real power behind Apache JMeter.
Table of Contents (17 chapters)
Title Page
About the Author
About the Reviewers
Customer Feedback


Performance testing is a type of testing intended to determine the responsiveness, reliability, throughput, interoperability, and scalability of a system and/or application under a given workload. It is critical and essential to the success of any software product's launch and maintenance. It also plays an integral part in scaling an application out to support a wider user base.

Apache JMeter is a free and open source, cross-platform performance testing tool that has been around since the late 90s. It is mature, robust, portable, and highly extensible. It has a large user base and offers a lot of plugins to aid testing.

This is a practical hands-on book that focuses on how to leverage Apache JMeter to meet your testing needs. It starts with a quick introduction on performance testing, but quickly moves into engaging topics including recording test scripts, monitoring system resources, an extensive look at several JMeter components, leveraging the cloud for testing, extending Apache JMeter capabilities via plugins, and so on. Along the way, you will do some scripting, learn and use tools such as Vagrant and Apache Tomcat, and be armed with all the knowledge you need to take on your next testing engagement.

Whether you are a developer or tester, this book is sure to impact you with some valuable knowledge to aid you in attaining success in your future testing endeavors.

What this book covers

Chapter 1, Performance Testing Fundamentals, covers the fundamentals of performance testing and the installation and configuration of JMeter.

Chapter 2, Recording Your First Test, dives into recording your first JMeter test script and covers the anatomy of a JMeter test script.

Chapter 3, Submitting Forms, explores form submission in detail. It includes handling various HTML form elements (checkboxes, radio, file uploads and downloads, and so on), JSON data, and XML.

Chapter 4, Managing Sessions, explains session management, including cookies and URL rewriting.

Chapter 5, Monitoring Tests in Real-Time, focuses on active monitoring and analysis of test execution results, as well as new components in JMeter 3 that make it possible.

Chapter 6, Distributed Testing, takes an in-depth look at leveraging cloud for performance testing. We dive into tools such as Vagrant and AWS, and explore the existing cloud-testing platforms BlazeMeter and

Chapter 7, Helpful Tips - Part 1, provides you with helpful techniques and tips for getting the most out of JMeter.

Chapter 8, Helpful Tips - Part 2, further provides you with more helpful techniques and tips continued from Chapter 7, Helpful Tips - Part 1.

What you need for this book

  • A computer with internet connection
  • Apache JMeter:
  • Java Runtime Environment (JRE) or Java Development Kit (JDK):

In addition, for Chapter 5, Monitoring Tests in Real-Time, you need the following:

  • Grafana:
  • InfluxDB:

For Chapter 6, Distributed Testing, you need these:

  • Vagrant:
  • AWS account:
  • BlazeMeter account:
  • account:
  • Code samples:

The book contains pointers and additional helpful links in setting all these up.

Who this book is for

This book is for software professionals who want to understand and improve the performance of their applications with Apache JMeter.


In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "Now, edit $JMETER_HOME/bin/jmeter-server using an editor of choice. "

A block of code is set as follows:


Any command-line input or output is written as follows:


New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "Right-click on Test Plan and navigate to Add | Threads (User) | Thread Group."


Warnings or important notes appear like this.


Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book-what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of. To send us general feedback, simply e-mail [email protected], and mention the book's title in the subject of your message. If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files for this book from your account at If you purchased this book elsewhere, you can visit and register to have the files e-mailed directly to you. You can download the code files by following these steps:

  1. Log in or register to our website using your e-mail address and password.
  2. Hover the mouse pointer on the SUPPORT tab at the top.
  3. Click on Code Downloads & Errata.
  4. Enter the name of the book in the Search box.
  5. Select the book for which you're looking to download the code files.
  6. Choose from the drop-down menu where you purchased this book from.
  7. Click on Code Download.

Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:

  • WinRAR / 7-Zip for Windows
  • Zipeg / iZip / UnRarX for Mac
  • 7-Zip / PeaZip for Linux

The code bundle for the book is also hosted on GitHub at We also have other code bundles from our rich catalog of books and videos available at Check them out!



Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books-maybe a mistake in the text or the code-we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title. To view the previously submitted errata, go to and enter the name of the book in the search field. The required information will appear under the Errata section.


Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy. Please contact us at [email protected] with a link to the suspected pirated material. We appreciate your help in protecting our authors and our ability to bring you valuable content.


If you have a problem with any aspect of this book, you can contact us at [email protected], and we will do our best to address the problem.