![]()
Performance Testing with JMeter 2.9
Table of Contents
Performance Testing with JMeter 2.9
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why Subscribe?
Free Access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. Performance Testing Fundamentals
The incident
The aftermath
Performance testing
Performance testing and tuning
Baselines
Load and stress testing
JMeter to the rescue
Up and running with JMeter
Installation
Installing Java JDK
Setting JAVA_HOME
On Windows
On Unix
Running JMeter
Command-line options
JMeter's Classpath
Configuring the proxy server
Running in non-GUI mode
Running in server mode
Overriding properties
Tracking errors during test execution
Configuring JMeter
Summary
2. Recording Your First Test
Configuring the JMeter HTTP proxy server
Setting up your browser to use the proxy server
Using a browser extension
Changing the system settings
Running your first recorded scenario
Anatomy of a JMeter test
Test Plan
Thread Groups
Controllers
Samplers
Logic controllers
Test fragments
Listeners
Timers
Assertions
Configuration elements
Pre-processor and post-processor elements
Summary
3. Submitting Forms
Capturing simple forms
Handling checkboxes
Handling radio buttons
Handling file uploads
Handling file downloads
Posting JSON data
Reading JSON data
Using the BSF PostProcessor
Handling the XML response
Summary
4. Managing Sessions
Managing sessions with cookies
Managing sessions with URL rewriting
Summary
5. Resource Monitoring
Basic server monitoring
Setting up Apache Tomcat Server
Configuring Tomcat users
Setting up a monitor controller in JMeter
Monitoring the server with a JMeter plugin
Installing the plugins
Adding monitor listeners to the test plan
Summary
6. Distributed Testing
Remote testing with JMeter
Configuring JMeter slave nodes
Configuring one slave per machine
Configuring the master node to be tested against one slave per machine
Configuring multiple slave nodes on a single box
Configuring the master node to be tested against multiple slave nodes on a single box
Leveraging the cloud for distributed testing
Obtaining your access key, secret key, and key pair
Launching an AWS instance
Executing the test plan
Viewing the results from the virtual machines
Summary
7. Helpful Tips
JMeter properties and variables
JMeter functions
The Regular Expression tester
The Debug sampler
Using timers in your test plan
The Constant timer
The Gaussian random timer
The Uniform random timer
The Constant throughput timer
The Synchronizing timer
The Poisson random timer
The JDBC Request sampler
Setting up an H2 database
Configuring a JDBC Connection Configuration component
Adding a JDBC Request sampler
A Dummy sampler
The JSON Path Extractor element
Handling RESTful web services
Summary
Index
![]()
Performance Testing with JMeter 2.9
Copyright © 2013 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: July 2013
Production Reference: 1200713
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78216-584-2
www.packtpub.com
![]()
Author
Bayo Erinle
Reviewers
Dmitri Nevedrov
Shantonu Sarker
Acquisition Editor
Kevin Colaco
Commissioning Editor
Llewellyn F. Rozario
Technical Editors
Anita Nayak
Sampreshita Maheshwari
Copy Editors
Aditya Nair
Laxmi Subramanian
Project Coordinator
Sherin Padayatty
Proofreader
Stephen Silk
Indexer
Hemangini Bari
Graphics
Abhinash Sahu
Ronak Dhruv
Production Coordinator
Zahid Shaikh
Cover Work
Zahid Shaikh
![]()
Bayo Erinle is a senior software engineer with over nine years' experience in designing, developing, testing, and architecting software. He has worked in various spectrums of the IT field, including government, finance, and health care. As a result, he has been involved in the planning, development, implementation, integration, and testing of numerous applications, including multi-tiered, standalone, distributed, and cloud-based applications. He is always intrigued by new technology and enjoys learning new things. He currently resides in Maryland, US, and when he is not hacking away at some new technology, he enjoys spending time with his wife Nimota and their three children, Mayowa, Durotimi, and Fisayo.
![]()
Dmitri Nevedrov has been working in software research and development for many years, primarily focusing on Java, J2EE technology, and performance optimization techniques. He lives in Denver, Colorado.
Shantonu Sarker is a proactive software test engineer with seven years of experience in test automation, develo...