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)

Load Testing a Website

A Bit of Theory

In Chapter 1, Quick Start with JMeter, we saw how to create and run a simple test case on a web application. In this chapter, we're going to go deeper into this part.

In order to access your web application, users will use the Hypertext Transfer Protocol (HTTP) protocol through their web browser.

The HTTP protocol is rather simple, and understanding it is of great help when writing a test script with JMeter. The role of HTTP is to exchange information between the client and the server.

As a picture says a thousand words:

Figure 7.1: A simplified view of the HTTP protocol

An HTTP request will have the following form:

  • One, and only one, HTTP method line in the form HTTPMETHOD URI Protocol/Version
  • Zero or more lines of headers in the form Header: Value
  • Possibly an empty line, if the body is not empty
  • Possibly the body of the request (the content)

For example, when accessing the European...