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)

Run Our Load Test and Analyze It

  1. Before launching our test, one last tip is to ask JMeter to generate an HTML report at the end.

    For this, we will use the following command line:

    <JMETER_HOME>/bin/jmeter -n -t [jmx file] -l [results file] -e -o [Path\ to output folder]

  2. Let's run our test and see what happens.

    In our terminal:

    Figure 1.30: Follows a load test in the terminal
    Figure 1.30: Follows a load test in the terminal
  3. In Grafana (the dashboard used is one of those proposed in the Grafana website (https://grafana.com/dashboards/3351)):

    Note

    We can use this dashboard, too: https://grafana.com/dashboards/5496.

    Figure 1.31: Real-time monitoring in Grafana
    Figure 1.31: Real-time monitoring in Grafana
    Figure 1.32: Real-time monitoring in Grafana
    Figure 1.32: Real-time monitoring in Grafana
  4. At the end of our test, we get the HTML dynamic Web Report with 17 graphs, an APDEX (https://en.wikipedia.org/wiki/Apdex) table, a statistics table (showing response times, error rates, network metrics…), a table with an errors summary, and a table with Top5errors per sampler. So, you get everything you need to analyze your load test:
Figure 1.33: HTML report
Figure 1.33: HTML report
Figure 1.34: HTML report
Figure 1.34: HTML report

The icing on the cake is a CSV file we get at the end of our test; this format is usable by many tools to visualize the results differently.

In this chapter, we have seen how to quickly get started with JMeter to perform a simple load test.