Master Apache JMeter - From Load Testing to DevOps
eBook - ePub

Master Apache JMeter - From Load Testing to DevOps

Master performance testing with JMeter

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

Buch teilen
  1. 466 Seiten
  2. English
  3. ePUB (handyfreundlich)
  4. Über iOS und Android verfügbar
eBook - ePub

Master Apache JMeter - From Load Testing to DevOps

Master performance testing with JMeter

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

Angaben zum Buch
Buchvorschau
Inhaltsverzeichnis
Quellenangaben

Über dieses Buch

Learn how to get the most out of JMeter, improve the productivity of your apps, and integrate JMeter with your Agile and DevOps processes.Key Features• Gain insights into preparing test environments and selecting the correct use cases to load test• Learn to analyze a load test with Backend Listener, HTML Report Dashboard, and View Results Tree• Explore how to integrate JMeter in the software factoryBook DescriptionLoad 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.What you will learn• Explore various JMeter concepts, including Timers scope and Assertions scope• Discover the types of test protocols and load tests that JMeter supports• Design a realistic test scenario using various tips and best practices• Prepare your test environment with injectors and the system under test• Learn and apply good practices when recording a script• Integrate JMeter with Jenkins using MavenWho this book is forThis book contains all the valuable information you need in one place and is a must for everybody who is seriously working with JMeter. It might be a little condensed for absolute beginners, but this book is the best you can find if you already have some performance testing experience and want to get further. In particular, it would be invaluable to developers who want to expand their JMeter knowledge into advanced topics or switch to JMeter from other load testing tools.

Häufig gestellte Fragen

Wie kann ich mein Abo kündigen?
Gehe einfach zum Kontobereich in den Einstellungen und klicke auf „Abo kündigen“ – ganz einfach. Nachdem du gekündigt hast, bleibt deine Mitgliedschaft für den verbleibenden Abozeitraum, den du bereits bezahlt hast, aktiv. Mehr Informationen hier.
(Wie) Kann ich Bücher herunterladen?
Derzeit stehen all unsere auf Mobilgeräte reagierenden ePub-Bücher zum Download über die App zur Verfügung. Die meisten unserer PDFs stehen ebenfalls zum Download bereit; wir arbeiten daran, auch die übrigen PDFs zum Download anzubieten, bei denen dies aktuell noch nicht möglich ist. Weitere Informationen hier.
Welcher Unterschied besteht bei den Preisen zwischen den Aboplänen?
Mit beiden Aboplänen erhältst du vollen Zugang zur Bibliothek und allen Funktionen von Perlego. Die einzigen Unterschiede bestehen im Preis und dem Abozeitraum: Mit dem Jahresabo sparst du auf 12 Monate gerechnet im Vergleich zum Monatsabo rund 30 %.
Was ist Perlego?
Wir sind ein Online-Abodienst für Lehrbücher, bei dem du für weniger als den Preis eines einzelnen Buches pro Monat Zugang zu einer ganzen Online-Bibliothek erhältst. Mit über 1 Million Büchern zu über 1.000 verschiedenen Themen haben wir bestimmt alles, was du brauchst! Weitere Informationen hier.
Unterstützt Perlego Text-zu-Sprache?
Achte auf das Symbol zum Vorlesen in deinem nächsten Buch, um zu sehen, ob du es dir auch anhören kannst. Bei diesem Tool wird dir Text laut vorgelesen, wobei der Text beim Vorlesen auch grafisch hervorgehoben wird. Du kannst das Vorlesen jederzeit anhalten, beschleunigen und verlangsamen. Weitere Informationen hier.
Ist Master Apache JMeter - From Load Testing to DevOps als Online-PDF/ePub verfügbar?
Ja, du hast Zugang zu Master Apache JMeter - From Load Testing to DevOps von Antonio Gomes Rodrigues, Bruno Demion (Milamber), Philippe Mouawad im PDF- und/oder ePub-Format sowie zu anderen beliebten Büchern aus Informatik & Webprogrammierung. Aus unserem Katalog stehen dir über 1 Million Bücher zur Verfügung.

Information

Jahr
2019
ISBN
9781839218200

Chapter 1

Quick Start with JMeter

With JMeter, you can quickly run your first load test. This chapter will show you how to set up a simple test case with JMeter and its HTTP(S) Test Script Recorder element.

Our Process

Here are the steps to set up our test:
  1. Launch JMeter and prepare the recording of our script
  2. Configure the browser to use the HTTP(S) Test Script Recorder of JMeter
  3. Record the script
  4. Customize our script (add assertions, rename transactions, add think time…)
  5. Validate our script with a single user
  6. Configure the load test (define the number of users, number of iterations, warm-up duration, and load test duration…)
  7. Run and analyze the load test

Setup JMeter to Record Our Browsing Session

  1. Launch JMeter:
    Figure 1.1: JMeter
    Figure 1.1: JMeter
  2. Use the Templates… feature of JMeter:
    Figure 1.2: JMeter Templates… feature
    Figure 1.2: JMeter Templates… feature
  3. Choose Recording with Think Time model and click Create:
    Figure 1.3: Recording template
    Figure 1.3: Recording template
  4. The test plan is ready:
    Figure 1.4: Result of Recording template
    Figure 1.4: Result of Recording template
  5. To save time in the future, we will select the HTTP Request Defaults element and fill in the Server Name or IP and Port Number sections:
    Figure 1.5: Result of Recording template
    Figure 1.5: Result of Recording template

    Note

    With this trick, we will share these two fields in every element HTTP Request Defaults and JMeter will not put them in each HTTP Request during recording.

    Caution

    During the load test, you should avoid having the injector (JMeter) on the same server as the application under test.
    Otherwise, the injected load will be impacted by the application's bad performance, and the application could be impacted by the injector's bad performance.
    Our tree is ready; we must now start the proxy server of JMeter.
    But before doing that, let's look at the HTTP(S) Test Script Recorder element.
  6. For the name of recorded transactions, we have two options in Recorder:
    Transaction name, which allows you to fully name them as you wish.
    Prefix, which will just prepend the prefix to the default name given by JMeter, which is usually the URL path.
    Figure 1.6: Transaction naming strategy
    Figure 1.6: Transaction naming strategy
  7. Note that with the default configuration of the template, static resources (image, CSS file, JS file…) are not recorded:
Figure 1.7: Exclude static resource capture
Figure 1.7: Exclude static resource capture
JMeter is now ready to record our navigation session.

Configure Your Browser

  1. In order for JMeter to record the navigation session, we must configure our browser to use the proxy server that JMeter launched.
  2. For example, with Firefox, choose the menu Edit > Preferences:
    Figure 1.8: Proxy selection in Firefox
    Figure 1.8: Proxy selection in Firefox
  3. Then select the Advanced tab and then the Network sub-tab. Let's click on Settings…:
    Figure 1.9: Proxy selection in Firefox – Network
    Figure 1.9: Proxy selection in Firefox – Network
  4. In the new window, select the Manual proxy configuration option, then fill in the HTTP Proxy field with the following IP address: 127.0.0.1 (corresponding to the local IP address (localhost)), and fill in the Port field with 8888 (corresponding to the default listening port of the JMeter proxy server).

    Caution

    When recording a local application, be careful to delete localhost and 127.0.0.1 from the No Proxy for: field.
  5. Finally, check the Use this proxy server for all protocols box.
  6. Let's save the modifications by clicking on the OK button in the Firefox window:
Figure 1.10: Proxy selection in Firefox – configuration
Figure 1.10: Proxy selection in Firefox – configuration

Save Our Script

Now, let's start our navigation session.
  1. To do this, simply click the Start button on the HT...

Inhaltsverzeichnis