Book Image

Master Apache JMeter - From Load Testing to DevOps

By : Antonio Gomes Rodrigues, Bruno Demion (Milamber), Philippe Mouawad
Book Image

Master Apache JMeter - From Load Testing to DevOps

By: Antonio Gomes Rodrigues, Bruno Demion (Milamber), Philippe Mouawad

Overview of this book

Load tests help identify the maximum number of requests a software system can handle. One popular open source tool for load testing is JMeter. By leveraging the features and capabilities of JMeter, you can perform extensive load testing and fix issues in your application before they become problematic. This book is written by JMeter developers and begins by discussing the whole process, including recording a script, setting it up, and launching it, enabling you to almost immediately start load testing. You'll learn the best practices that you must follow while designing test cases. You'll also explore the different protocols offered by JMeter through various real-world examples. Finally, you'll see how to integrate JMeter into the DevOps approach and create professional reports. You'll discover ways to use the eco-system of JMeter to integrate new protocols, enrich its monitoring, and leverage its power through the use of the cloud. By the end of this book, you'll know all that's needed to perform comprehensive load testing on your applications by using all the best practices and features of JMeter.
Table of Contents (14 chapters)

Put into Practice with JMeter

It's time to practice.

Example 1: Simulate Realistic Load

For this first example, we will use the Java EE 6 Pet Catalog application (https://netbeans.org/kb/samples/pet-catalog.html):

Note

This application is distributed with NetBeans; installation and configuration instructions are included.

Figure 7.23: Java EE 6 Pet Catalog

In our scenario, we will be looking at the details of the animals available on the site.

The steps of our scenario will be:

  1. Log in to the site:
    Figure 7.24: Connection to the site
  2. Select and display the details of a cat:
    Figure 7.25: Selection of a cat
    Figure 7.26: Viewing the details
  3. Go back to the list:
    Figure 7.27: Back to the list
  4. Show the next page:
    Figure 7.28: Display next page
  5. Select the details of a cat:
    Figure 7.29: Selection of a cat
  6. Let's use the Template Recording with Think Time wizard seen above and save our script (see Chapter 1, Quick Start with JMeter, for more details):
    Figure 7.30...