Master Apache JMeter – From Load Testing to DevOps.

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

True pdf.

Author(s): Antonio Gomes Rodrigues et al.
Edition: 1
Publisher: Packt
Year: 2019

Language: English

Cover
FM
Copyright
Table of Contents
Preface
Chapter 1: Quick Start with JMeter
Our Process
Setup JMeter to Record Our Browsing Session
Configure Your Browser
Save Our Script
Validate Our Script with Only One User
Setup Our Load Test and Launch It
Run Our Load Test and Analyze It
Chapter 2: JMeter Overview
JMeter Overview
Types of Load Tests Supported
Supported Test Protocols
Reporting
Chapter 3: Designing a Test Case
Introduction
Warning
Type of Load Test
Performance/Load Test
Stress Test
Soak/Endurance Test
Failover/Resilience Test
Spike Test
Other
Load Model
Concurrency User (Closed Model)
Throughput (Open Model)
Arrivals Rate (Open Model)
Structure of a Test Case
Ramp-Up
Plateau/Step
Ramp-Down
Example: Step Load Test
Identify Critical Business Scenarios to Script
Frequent
Vital
Risky
How Many Virtual Users Do I Need?
Parameters to Take into Account when Creating a Scenario
Vary User Input
Reuse the Same Values
Vary the Types of Users
Vary and Adjust Think Times
Adjust the Ramp-Up Time
Adjust the Test Duration
Error Handling
User Connection Type
Size of the Scenarios
Meeting Point/Rendezvous
Cookie Management
Cache Management
Conclusion
Chapter 4: Important Concepts in JMeter
Scoping
Elements' Execution Order
How Timer Scope Works
Rule 1: Timers Are Executed before Each Sampler in Their Scope
Rule 2: If There Is More Than One Timer in the Scope, All the Timers Will Be Processed before the Sampler
Controlling the Execution Order of Timers
How Assertion Scope Works
Rule 1: Assertions Are Executed after Each Sampler in Their Scope or to Parent Samplers
Rule 2: Failed Assertions Cause the Failure of the Entire Transaction Controller
Rule 3: Assertions Can Validate the Main Sample and/or the Sub-Samples
Rule 4: Be Careful with Low-Performing Assertions
Our Advice
How Properties Differ from Variables
How Properties Are Created
How Variables Are Created
How ${} Differs from ${_P}
Chapter 5: Preparing the Test Environment (Injectors and Tested Systems)
Introduction
Setting Up the Injectors
Never Host Injectors on the Same Server as the Tested System
Calibrating Your Test
Monitoring Injectors
IP Spoofing
Using the Latest Version
JMeter Memory Configuration
Avoiding Load Testing behind a Proxy
Preparation of the System under Test
A Testing Environment
An Environment Consistent with the Target
Datasets
Take into Account Calls to Third-Party Services
Disabling Protection Systems
Using Isolated Environments
License Management
Monitoring
Conclusion
Chapter 6: Being Productive with JMeter
Introduction
Good Practices When Recording a Script
Use the HTTP(S) Test Script Recorder Element
BlazeMeter Chrome Extension
Pre-Populating HTTP Request Defaults before Recording the Script
Use Tools / Import from cURL
Static Resources
Using Timeouts
Applying a Naming Convention to Transactions/Requests
Global Assertion
Reusing Script Parts
Recording an HTTPS website
Keyboard Shortcuts
Debugging a script
Using View Results Tree
Capturing Errors
Debug Sampler
jp@gc - Dummy Sampler
Log Viewer
BlazeMeter's Step-by-Step Debugger
The Old-Fashioned Way in the Console
Using a Third-Party Tool
Finalizing a Script
Changing the Name of a Transaction According to a Parameter
Sharing an Object between Different Thread Groups
Getting the Most out of CSV Files
Marking a Response as an Error
Using a Regular Expression Extractor on Content with Spaces and Multiple Lines
Executing an Action Based on the Status of the Previous One
Adding Headers to Our HTTP Requests
Waiting with While Controller
The Right Extractor at the Right Time
Handle Cookies
Conclusion
Chapter 7: Load Testing a Website
A Bit of Theory
Setup with JMeter
Methodology
Put into Practice with JMeter
Example 1: Simulate Realistic Load
Example 2: Technical Tests with Byteman
Example 3: Technical Tests with JProfiler
Example 4: Tricking CAPTCHAs with a Java Request
Conclusion
Chapter 8: Load Testing Web Services
A Few Concepts
REST (REpresentational State Transfer) Web Services
WS-\* Web Services
Setup with JMeter
Methodology
Practice with JMeter
SOAP/XML-RPC Web Services
REST Web Service: Discussion Forum
REST Web Service: Customer Database
Conclusion
Chapter 9: Load Testinga Database Server
A Bit of Theory
Methodology
Setup with JMeter
Putting Theory into Practice with JMeter
Example 1: Load Test of a Database
Example 2: Studying the Impact of Indexes on Performance
Example 3: ETL
Conclusion
Chapter 10: Load TestingMessage-Oriented Middleware (MOM) via JMS
A Bit of Theory
Asynchronous Messages
Decoupling
Back Pressure
Communication Models
What is a Message Composed of?
Setup with JMeter
Installing the MOM libraries
The JMS Point-to-Point Element
JMS Resources and JNDI Properties
Publish/Subscribe
Methodology
Putting It into Practice with JMeter
Example 1: Testing the Configuration of an MOM server with Point-to-Point Messaging
Example 2: Testing the Performance of Our Consumer with JMS Publish/Subscribe
Example 3: Testing the Configuration of an MOM Server with Publish/Subscribe
Example 4: Testing Any MOM
Conclusion
Chapter 11: Performinga Load Test
Introduction
Methodology
Testing Your Script with the Graphical User Interface
Running Your Test from the Command Line
Running Your Test on the Command Line with Taurus
Running Your Test from Apache Maven
Running Your Test from Jenkins
Running Your Test from Apache Ant
Best Practices
Have Well-Prepared Injectors
Generating Reports at the End of the Test
Chapter 12: Visualizing and Analyzing the Load Testing Results
Introduction
Visualizing the Results with Listeners
View Results Tree
Summary Report
Aggregate Report
Backend Listener
Report Dashboard
Particularities of the Visualization of Results a Distributed Load Test before JMeter 5.0
Visualizing the Results with Third Party Visualizing Tools
Visualizing the Results with PaaS Load Testing tools
Redline13
BlazeMeter
Some Tips to Read the Results
Prefer Percentiles over Average
Be Careful with Downsampling and Data Retention
Be Careful with Metric Definition
Be Careful with Response Time at the Beginning of the Load Test
Don't Rely on the Metrics of a Short Load Test
Check Response Time Distribution
Some Tips to Present the Results
Don't Average Percentiles
Define the Number of Metrics to Display in a Time Series Line Graph
Define the Resolution/Granularity of the Measures
Don't Forget to Add Labels, Legends, and Units in Graphs
Axis Forced 0
Don't Use Pie Charts
Prefer Bar Graphs When We Have Sparse Metrics
Present Errors with Toplist
Time Series Graphs and Single-Value Summaries
Conclusion
Chapter 13: Integration of JMeter in the DevOpsTool Chain
Introduction
Organization/Team Topology
Load Testing Team in Its Ivory Tower
DevOps and Load Test Team Collaboration
One Performance Tester Integrated on DevOps Team
No Performance Tester
Team of Evangelists Performance Testers
Setting Up Shift-Left Strategy
Modification in JMeter Script to Implement Shift-Left Strategy
Integrating JMeter in Our Software Factory
Example 1: Integrating with Jenkins Using Maven
Example 2: Enhancing Integration with Jenkins Using Performance Plugin
Automation
Example 3: Non-Regression Testing of Memory Consumption with EJ JProfiler
Example 4: Detecting a Memory Leak during an Endurance Test with EJ JProfiler
Example 5: Retrieving SQL Queries Executed during a Load Test with YourKit Java Profiler
Example 6: Analysis of the Garbage Collector (GC) Log File with GCViewer
Example 7: Non-Regression Testing of Web APIs with Dynatrace AppMon
Conclusion
Index