Reader small image

You're reading from  Master Apache JMeter - From Load Testing to DevOps

Product typeBook
Published inAug 2019
Reading LevelBeginner
Publisher
ISBN-139781839217647
Edition1st Edition
Languages
Right arrow
Authors (3):
Antonio Gomes Rodrigues
Antonio Gomes Rodrigues
author image
Antonio Gomes Rodrigues

Antonio Gomes Rodrigues has been an expert in the field of application performance for more than 10 years. Antonio has significant experience working with load testing tools like JMeter and LoadRunner. He is currently a committer and a PMC member of the JMeter project within the Apache Software Foundation.
Read more about Antonio Gomes Rodrigues

Bruno Demion (Milamber)
Bruno Demion (Milamber)
author image
Bruno Demion (Milamber)

Bruno Demion, better known as Milamber, is a French computer scientist. Since December 2003, he has been working with JMeter to perform load tests in various missions and training courses. He contributes to the JMeter project, in particular on the translation into French of the graphical interface, corrections of anomalies as well as some behaviors (proxy HTTPS, new results tree, icon bar, and so on). He is currently a committer, PMC member and the PMC Chair of the Apache JMeter project within the Apache Software Foundation.
Read more about Bruno Demion (Milamber)

Philippe Mouawad
Philippe Mouawad
author image
Philippe Mouawad

Philippe Mouawad is a technical expert and architect in J2E and web environments in the company Ubik-Ingenierie. He has been using JMeter since 2009. He contributes to the JMeter-Plugins (Redis DataSet, Graphs Generator Listener, and various patches) project. He is currently a committer and a PMC member of the JMeter project within the Apache Software Foundation. He is also a lead developer of the Ubik Load Pack solution.
Read more about Philippe Mouawad

View More author details
Right arrow

Setup Our Load Test and Launch It

  1. To set up our load test, select the Thread Group element in order to change the following values:

    Number of Threads (users): 10

    Ramp-Up Period (in seconds): 10

    Loop Count: 100

    This gives 10 virtual users (VU) who arrive in 10 seconds (1 per second), and each one will make 100 executions of the query sequence.

    Figure 1.27: Load test parameters
    Figure 1.27: Load test parameters

    Caution

    Several strategies for setting the load test exists. This point will be discussed deeply in Chapter 2, JMeter Overview.

  2. We could run our load test directly from the JMeter GUI, but this is not recommended as it would not be optimal for performances of injection (although, in our case, with only 10 users, it shouldn't be a problem).
  3. When load testing, it is advisable to monitor the injectors (servers where JMeter runs) at least during the first test at full load to validate the correct behavior of the injectors.

    This ensures that if we get bad response times, the cause is the application being tested and not JMeter.

    Note that this is not specific to JMeter but should be done regardless of the tool you use.

    Note

    An easy and quick solution to monitor JMeter can be to use the Servers Performance Monitoring plugin from the JMeter Plugins (https://jmeter-plugins.org/wiki/PerfMon/).

  4. So, let's use best practices directly and run our test from the command line in CLI mode (also called Non-GUI mode in JMeter).
  5. But before that, to follow our test in real time, we will add the Backend Listener element to enable live monitoring of the progress of the test with Grafana (https://grafana.com/).
  6. To do this, right-click on Test Plan -> Add -> Listener -> Backend Listener:
    Figure 1.28: Add Backend Listener
    Figure 1.28: Add Backend Listener
  7. Let's configure it to send the test results to our InfluxDB database (https://www.influxdata.com/):
Figure 1.29: Backend Listener configuration
Figure 1.29: Backend Listener configuration

Note

In the samplersRegex field, we can use a regular expression to keep only the queries that were recorded by the HTTP(S) Test Script Recorder element (thanks to Prefix: field).

Previous PageNext Page
You have been reading a chapter from
Master Apache JMeter - From Load Testing to DevOps
Published in: Aug 2019Publisher: ISBN-13: 9781839217647
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime

Authors (3)

author image
Antonio Gomes Rodrigues

Antonio Gomes Rodrigues has been an expert in the field of application performance for more than 10 years. Antonio has significant experience working with load testing tools like JMeter and LoadRunner. He is currently a committer and a PMC member of the JMeter project within the Apache Software Foundation.
Read more about Antonio Gomes Rodrigues

author image
Bruno Demion (Milamber)

Bruno Demion, better known as Milamber, is a French computer scientist. Since December 2003, he has been working with JMeter to perform load tests in various missions and training courses. He contributes to the JMeter project, in particular on the translation into French of the graphical interface, corrections of anomalies as well as some behaviors (proxy HTTPS, new results tree, icon bar, and so on). He is currently a committer, PMC member and the PMC Chair of the Apache JMeter project within the Apache Software Foundation.
Read more about Bruno Demion (Milamber)

author image
Philippe Mouawad

Philippe Mouawad is a technical expert and architect in J2E and web environments in the company Ubik-Ingenierie. He has been using JMeter since 2009. He contributes to the JMeter-Plugins (Redis DataSet, Graphs Generator Listener, and various patches) project. He is currently a committer and a PMC member of the JMeter project within the Apache Software Foundation. He is also a lead developer of the Ubik Load Pack solution.
Read more about Philippe Mouawad