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

Condividi libro
  1. 466 pagine
  2. English
  3. ePUB (disponibile sull'app)
  4. Disponibile su iOS e Android
eBook - ePub

Master Apache JMeter - From Load Testing to DevOps

Master performance testing with JMeter

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

Dettagli del libro
Anteprima del libro
Indice dei contenuti
Citazioni

Informazioni sul libro

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.

Domande frequenti

Come faccio ad annullare l'abbonamento?
È semplicissimo: basta accedere alla sezione Account nelle Impostazioni e cliccare su "Annulla abbonamento". Dopo la cancellazione, l'abbonamento rimarrà attivo per il periodo rimanente già pagato. Per maggiori informazioni, clicca qui
È possibile scaricare libri? Se sì, come?
Al momento è possibile scaricare tramite l'app tutti i nostri libri ePub mobile-friendly. Anche la maggior parte dei nostri PDF è scaricabile e stiamo lavorando per rendere disponibile quanto prima il download di tutti gli altri file. Per maggiori informazioni, clicca qui
Che differenza c'è tra i piani?
Entrambi i piani ti danno accesso illimitato alla libreria e a tutte le funzionalità di Perlego. Le uniche differenze sono il prezzo e il periodo di abbonamento: con il piano annuale risparmierai circa il 30% rispetto a 12 rate con quello mensile.
Cos'è Perlego?
Perlego è un servizio di abbonamento a testi accademici, che ti permette di accedere a un'intera libreria online a un prezzo inferiore rispetto a quello che pagheresti per acquistare un singolo libro al mese. Con oltre 1 milione di testi suddivisi in più di 1.000 categorie, troverai sicuramente ciò che fa per te! Per maggiori informazioni, clicca qui.
Perlego supporta la sintesi vocale?
Cerca l'icona Sintesi vocale nel prossimo libro che leggerai per verificare se è possibile riprodurre l'audio. Questo strumento permette di leggere il testo a voce alta, evidenziandolo man mano che la lettura procede. Puoi aumentare o diminuire la velocità della sintesi vocale, oppure sospendere la riproduzione. Per maggiori informazioni, clicca qui.
Master Apache JMeter - From Load Testing to DevOps è disponibile online in formato PDF/ePub?
Sì, puoi accedere a Master Apache JMeter - From Load Testing to DevOps di Antonio Gomes Rodrigues, Bruno Demion (Milamber), Philippe Mouawad in formato PDF e/o ePub, così come ad altri libri molto apprezzati nelle sezioni relative a Informatik e Webprogrammierung. Scopri oltre 1 milione di libri disponibili nel nostro catalogo.

Informazioni

Anno
2019
ISBN
9781839218200
Edizione
1
Argomento
Informatik

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...

Indice dei contenuti