Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Performance Testing with JMeter 2.9
Performance Testing with JMeter 2.9

Performance Testing with JMeter 2.9: If you want to use JMeter for performance testing your software products, this book is a great starting point. You'll get a great grounding in all the fundamentals and gain a wealth of new skills along the way.

eBook
€17.99 €25.99
Paperback
€32.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Performance Testing with JMeter 2.9

Chapter 1. Performance Testing Fundamentals

Baysoft Training Inc. is an emerging startup company focused on redefining how software will help get more people trained in various fields in the IT industry. The company achieves this goal by providing a suite of products, including online courses, onsite training, and offsite training. As such, one of their flagship products, TrainBot—a web-based application—is focused solely on registering individuals for courses of interest that will aid them in attaining career goals. Once registered, the client can then go on to take a series of interactive online courses.

The incident


Up until recently, traffic on TrainBot had been light as it had only been opened to a handful of clients, since it was still in closed beta. Everything was fully operational and the application as a whole was very responsive. Just a few weeks ago, TrainBot was open to the public and all was still good and dandy. To celebrate the launch and promote its online training courses, Baysoft Training Inc. recently offered 75 percent off for all the training courses. However, that promotional offer caused a sudden influx on TrainBot, far beyond what the company had anticipated. Web traffic shot up by 300 percent and suddenly things took a turn for the worse. Network resources weren't holding up well, server CPUs and memory were at 90-95 percent and database servers weren't far behind due to high I/O and contention. As a result, most web requests began to get slower response times, making TrainBot totally unresponsive for most of its first-time clients. It didn't take too long after that for the servers to crash and for the support lines to get flooded.

The aftermath


It was a long night at BaySoft Training Inc. corporate office. How did this happen? Could this have been avoided? Why was the application and system not able to handle the load? Why weren't adequate performance and stress tests conducted on the system and application? Was it an application problem, a system resource issue or a combination of both? All of these were questions management demanded answers to from the group of engineers, which comprised software developers, network and system engineers, quality assurance (QA) testers, and database administrators gathered in the WAR room. There sure was a lot of finger pointing and blame to go around the room. After a little brainstorming, it wasn't too long for the group to decide what needed to be done. The application and its system resources will need to undergo extensive and rigorous testing. This will include all facets of the application and all supporting system resources, including, but not limited to, infrastructure, network, database, servers, and load balancers. Such a test will help all the involved parties to discover exactly where the bottlenecks are and address them accordingly.

Performance testing


Performance testing is a type of testing intended to determine the responsiveness, reliability, throughput, interoperability, and scalability of a system and/or application under a given workload. It could also be defined as a process of determining the speed or effectiveness of a computer, network, software application, or device. Testing can be conducted on software applications, system resources, targeted application components, databases, and a whole lot more. It normally involves an automated test suite as this allows for easy, repeatable simulations of a variety of normal, peak, and exceptional load conditions. Such forms of testing help verify whether a system or application meets the specifications claimed by its vendor. The process can compare applications in terms of parameters such as speed, data transfer rate, throughput, bandwidth, efficiency, or reliability. Performance testing can also aid as a diagnostic tool in determining bottlenecks and single points of failure. It is often conducted in a controlled environment and in conjunction with stress testing; a process of determining the ability of a system or application to maintain a certain level of effectiveness under unfavorable conditions.

Why bother? Using Baysoft's case study mentioned earlier, it should be obvious why companies bother and go through great lengths to conduct performance testing. Disaster could have been minimized, if not totally eradicated, if effective performance testing had been conducted on TrainBot prior to opening it up to the masses. As we go ahead in this chapter, we will continue to explore the many benefits of effective performance testing.

At a very high level, performance testing is always almost conducted to address one or more risks related to expense, opportunity costs, continuity, and/or corporate reputation. Conducting such tests help give insights to software application release readiness, adequacy of network and system resources, infrastructure stability, and application scalability, just to name a few. Gathering estimated performance characteristics of application and system resources prior to the launch helps to address issues early and provides valuable feedback to stakeholders, helping them make key and strategic decisions.

Performance testing covers a whole lot of ground including areas such as:

  • Assessing application and system production readiness

  • Evaluating against performance criteria

  • Comparing performance characteristics of multiple systems or system configurations

  • Identifying source of performance bottlenecks

  • Aiding with performance and system tuning

  • Helping to identify system throughput levels

  • Testing tool

Most of these areas are intertwined with each other, each aspect contributing to attaining the overall objectives of stakeholders. However, before jumping right in, let's take a moment to understand the core activities in conducting performance tests:

  • Identify the test environment: Becoming familiar with the physical test and production environments is crucial to a successful test run. Knowing things, such as the hardware, software, and network configurations of the environment help derive an effective test plan and identify testing challenges from the outset. In most cases, these will be revisited and/or revised during the testing cycle.

  • Identify acceptance criteria: What is the acceptable performance of the various modules of the application under load? Specifically, identify the response time, throughput, and resource utilization goals and constraints. How long should the end user wait before rendering a particular page? How long should the user wait to perform an operation? Response time is usually a user concern, throughput a business concern, and resource utilization a system concern. As such, response time, throughput, and resource utilization are key aspects of performance testing. Acceptance criteria is usually driven by stakeholders and it is important to continuously involve them as testing progresses as the criteria may need to be revised.

  • Plan and design tests: Know the usage pattern of the application (if any), and come up with realistic usage scenarios including variability among the various scenarios. For example, if the application in question has a user registration module, how many users typically register for an account in a day? Do those registrations happen all at once, or are they spaced out? How many people frequent the landing page of the application within an hour? Questions such as these help to put things in perspective and design variations in the test plan. Having said that, there may be times where the application under test is new and so no usage pattern has been formed yet. At such times, stakeholders should be consulted to understand their business process and come up with as close to a realistic test plan as possible.

  • Prepare the test environment: Configure the test environment, tools, and resources necessary to conduct the planned test scenarios. It is important to ensure that the test environment is instrumented for resource monitoring to help analyze results more efficiently. Depending on the company, a separate team might be responsible for setting up the test tools, while another may be responsible for configuring other aspects such as resource monitoring. In other organizations, a single team is responsible for setting up all aspects.

  • Record the test plan: Using a testing tool, record the planned test scenarios. There are numerous testing tools available, both free and commercial that do the job quite well, each having their pros and cons.

    Such tools include HP Load Runner, NeoLoad, LoadUI, Gatling, WebLOAD, WAPT, Loadster, LoadImpact, Rational Performance Tester, Testing Anywhere, OpenSTA, Loadstorm, and so on. Some of these are commercial while others are not as mature or as portable or extendable as JMeter is. HP Load Runner, for example, is a bit pricey and limits the number of simulated threads to 250 without purchasing additional licenses. It does offer a much nicer graphical interface and monitoring capability though. Gatling is the new kid on the block, is free and looks rather promising. It is still in its infancy and aims to address some of the shortcomings of JMeter, including easier testing DSL (domain specific language) versus JMeter's verbose XML, nicer and more meaningful HTML reports, among others. Having said that, it still has only a tiny user base when compared with JMeter, and not everyone may be comfortable with building test plans in Scala, its language of choice. Programmers may find it more appealing.

    In this book, our tool of choice will be Apache JMeter to perform this step. That shouldn't be a surprise considering the title of the book.

  • Run the tests: Once recorded, execute the test plans under light load and verify the correctness of the test scripts and output results. In cases where test or input data is fed into the scripts to simulate more realistic data (more on that in the later chapters), also validate the test data. Another aspect to pay careful attention to during test plan execution is the server logs. This can be achieved through the resource monitoring agents set up to monitor the servers. It is paramount to watch for warnings and errors. A high rate of errors, for example, could be indicative that something is wrong with the test scripts, application under test, system resource, or a combination of these.

  • Analyze results, report, and retest: Examine the results of each successive run and identify areas of bottleneck that need addressing. These could be system, database, or application related. System-related bottlenecks may lead to infrastructure changes such as increasing the memory available to the application, reducing CPU consumption, increasing or decreasing thread pool sizes, revising database pool sizes, and reconfiguring network settings. Database-related bottlenecks may lead to analyzing database I/O operations, top queries from the application under test, profiling SQL queries, introducing additional indexes, running statistics gathering, changing table page sizes and locks, and a lot more. Finally, application-related changes might lead to activities such as refactoring application components, reducing application memory consumption and database round trips. Once the identified bottlenecks are addressed, the test(s) should then be rerun and compared with previous runs. To help better track what change or group of changes resolved a particular bottleneck, it is vital that changes are applied in an orderly fashion, preferably one at a time. In other words, once a change is applied, the same test plan is executed and the results compared with a previous run to see if the change made had any improved or worsened effect on results. This process repeats until the performance goals of the project have been met.

Performance testing core activities

Performance testing is usually a collaborative effort between all parties involved. Parties include business stakeholders, enterprise architects, developers, testers, DBAs, system admins, and network admins. Such collaboration is necessary to effectively gather accurate and valuable results when conducting testing. Monitoring network utilization, database I/O and waits, top queries, and invocation counts, for example, helps the team find bottlenecks and areas that need further attention in ongoing tuning efforts.

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Create realistic and maintainable scripts for web applications
  • Use various JMeter components to achieve testing goals
  • Removal of unnecessary errors and code compilation
  • Acquire skills that will enable you to leverage the cloud for distributed testing
  • Effectively monitor server resources during performance testing
  • Extend JMeter functionality by installing plugins

Description

Performance testing with JMeter 2.9 is critical to the success of any software product launch and continued scalability. Irrespective of the size of the application's user base, it's vital to deliver the best user experience to consumers. Apache JMeter is an excellent testing tool that provides an insight into how applications might behave under load enabling organizations to focus on making adequate preparations. Performance Testing with JMeter 2.9 is a practical, hands-on guide that equips you with all the essential skills needed to effectively use JMeter to test web applications using a number of clear and practical step-by-step guides. It allows you take full advantage of the real power behind Apache JMeter, quickly taking you from novice to master. Performance Testing with JMeter 2.9 begins with the fundamentals of performance testing and gets you acquainted with JMeter. It will guide you through recording realistic and maintainable scripts. You will acquire new skills working with tools such as Vagrant, Puppet, and AWS, allowing you to leverage the cloud to aid in distributed testing. You will learn how to do some BeanShell scripting and take advantage of regular expressions, JMeter properties, and extension points to build comprehensive and robust test suites. Also, you will learn how to test RESTful web services, deal with XML, JSON, file downloads/uploads, and much more. Topics like resource monitoring, distributed testing, managing sessions, and extending JMeter are also covered. Performance Testing with JMeter 2.9 will teach you all you need to know to take full advantage of JMeter for testing web applications, dazzle your co-workers, and impress your boss! You will go from novice to pro in no time.

Who is this book for?

This book is for developers, quality assurance engineers, testers, and test managers new to Apache JMeter, or those who are looking to get a good grounding in how to effectively use and become proficient with it. No prior testing experience is required.

What you will learn

  • Set up and prepare Apache JMeter for testing
  • Record test scenarios or create them from scratch
  • Test RESTful web services
  • Effectively monitor resources during a performance test
  • Maintain and manage user sessions
  • Distributed testing using Vagrant, Puppet, and AWS
  • Extend JMeter functionality through plugins
  • Understand and effectively use JMeter components to achieve testing needs
  • Build realistic, comprehensive, and maintainable test plans
  • Capture form submissions and appropriate handle server responses

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Jul 26, 2013
Length: 148 pages
Edition : 1st
Language : English
ISBN-13 : 9781782165859
Vendor :
Apache
Category :
Languages :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Jul 26, 2013
Length: 148 pages
Edition : 1st
Language : English
ISBN-13 : 9781782165859
Vendor :
Apache
Category :
Languages :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 107.97
Performance Testing with JMeter 2.9
€32.99
Selenium Testing Tools Cookbook
€37.99
JMeter Cookbook
€36.99
Total 107.97 Stars icon

Table of Contents

7 Chapters
Performance Testing Fundamentals Chevron down icon Chevron up icon
Recording Your First Test Chevron down icon Chevron up icon
Submitting Forms Chevron down icon Chevron up icon
Managing Sessions Chevron down icon Chevron up icon
Resource Monitoring Chevron down icon Chevron up icon
Distributed Testing Chevron down icon Chevron up icon
Helpful Tips Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.5
(13 Ratings)
5 star 30.8%
4 star 30.8%
3 star 7.7%
2 star 23.1%
1 star 7.7%
Filter icon Filter
Top Reviews

Filter reviews by




Zofia Nowinska Apr 26, 2014
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I was looking for a book which help me to learn more about new version of JMeter and prepare training for my colleagues.I found this book a very good source of information, with practical advices in performance testing, with examples from real world.
Amazon Verified review Amazon
Yinka Erinle Oct 05, 2013
Full star icon Full star icon Full star icon Full star icon Full star icon 5
For anyone that has ever tried to read the JMeter documentation, you will agree it leaves you wanting. Look no further because this book fulfills that desire.Although it is not the first book on JMeter, it is certainly the one with the most current and relevant information in regards to leveraging the power of the tool for modern software stacks.Chapter 1: Begins by detailing a performance issue on a website that occurred due to a sudden surge in web traffic, a scenario that is commonly known as been slashdotted or techcrunched (Articles on any of these sites can significantly increase traffic to a website mentioned in the article). Then the book makes the case for performance testing, explains what is, where it fits in the SDLC process and why we should care.Chapter 3: Walks you through scenarios that are required for testing a web application by showing ways to tame any form elements on a web page. Also explains how to go about testing RESTful services, handling JSON or XML.Chapter 6: On distributed testing is full of amazing useful information, you learn how to configure a test involving multiple slave nodes on the same machine, the author walks you through the process of setting up and using vagrant to do this. While your mouth is still wide opened digesting the new possibilities you now have available in ensuring your application can handle concurrent requests and load, the author kicks it up a notch by showing you how to use the same configuration in the cloud (AWS).It's amazing the amount of information the author manages to deliver in 200+ pages.The book has so many useful tips and I firmly believe it is currently the best resource on JMeter.If you are working with JMeter or plan to, do yourself a favor and get this book.
Amazon Verified review Amazon
hakbox android Aug 15, 2014
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book is great for a quick refresher if you haven't used JMeter in a while. It's also great for people who have not used JMeter before, as it gives some very basic and easy to understand step by step instructions on getting setup to run your first load and performance tests. It also covers some more advanced topics, albeit at a very high level.
Amazon Verified review Amazon
SuJo Sep 20, 2013
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Performance Testing with JMeter 2.9[...] - Pact Publishing If you are a web developer then you also know how important it is to stress test your applications, I have never used JMeter before, keeping that in mind I had a really fun and exciting adventure with reading this book. I was able to setup the test environment in order to utilize JMeter, the source code provided by the publisher worked without any errors. When you are developing your web applications it's important to stress test and check for bottlenecks before you set the project to go live, JMeter allowed me to check my code for these issues and previously I would have not been able to do that, so my code would go live and if a bottleneck occurred I would have to analyze everything without the use of a tool, typically I'd check my database, then I would try to see where I could optimize my code, talk about a lot of wasted time! One thing that I would love to let you know that I took away from reading this book was setting up a monitor controller in JMeter, it's so important to monitor a server, but even more important to check the load the server is dealing with, you can then track peak times and optimize for those spikes with previous data samples. So check your threads and know exactly where you're bottleneck is occurring!
Amazon Verified review Amazon
Tim Koopmans Oct 02, 2013
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
It's great to see another JMeter book from Packt Publishing, and this title is an improvement to the original [...]I felt it is aimed at beginner to intermediate users, and it would be good to see a follow up title with some more advanced topics (cookbook recipe style perhaps?) to fill the gap.Having said that, this is a great companion book for those getting started with JMeter and will save them a lot of hassle navigating the current online docs for JMeter.The use of vagrant with puppet/aws provisioning is interesting, although distributed testing on the cloud is covered well by providers such as Flood.ioNot sure this book will take you from novice to pro but I will be recommending it to new users of JMeter in future.Well done Bayo
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.