Search icon CANCEL
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
$43.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
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
Table of content icon View table of contents Preview book icon Preview Book

Performance Testing with JMeter 2.9

Chapter 2. Recording Your First Test

JMeter comes with a built-in proxy server (http://en.wikipedia.org/wiki/Proxy_server) to aid you record test plans. The proxy server, once configured, watches your actions as you perform operations on a website, creates test sample objects for them and eventually stores them in your test plan; that is, a JMX file. JMeter gives you the option of creating test plans manually, but this is mostly impractical for recording most testing scenarios. You will save a whole lot of time using the proxy recorder, as you will see in a bit.

So without further ado, let's record our first test! For this, we will record the browsing of JMeter's own official website as a user would normally do. For the proxy server to be able to watch your actions, it will need to be configured. This entails two steps:

  1. Setting up the HTTP proxy server within JMeter.

  2. Setting the proxy in the browser.

Configuring the JMeter HTTP proxy server


The first step is to configure the proxy server in JMeter. To do this, we follow the following steps:

  1. Start JMeter.

  2. Add a Thread Group by right-clicking on Test Plan and navigating to Add | Threads (User) | Thread Group.

  3. Add the HTTP Proxy Server element by right-clicking on WorkBench and navigating to Add | Non-Test Elements | HTTP Proxy Server.

  4. Change the port to 7000 (under Global Settings).You can use a different port if you want to. What is important is to choose a port that is not currently used by an existing process on the machine. The default is 8080.

  5. Go to Test Plan | Thread Group under HTTP Proxy Server (under the Test plan content | Target Controller section). This allows the recorded actions to be targeted to the thread group we created in step 2.

  6. Choose the option Put each group in a new transaction controller under HTTP Proxy Server (under Test plan content | Grouping section). This allows you to group a series of requests as constituting...

Setting up your browser to use the proxy server


There are several ways to set up the browser of your choice to use the proxy server. We'll go over two of the most common ways, starting with our personal favorite, which is using a browser extension.

Using a browser extension

Google Chrome and Firefox have vibrant browser plugin ecosystems that allow you to extend the capabilities of your browser with each plugin you choose. For setting up a proxy, we really like FoxyProxy (http://getfoxyproxy.org/). It is a neat add-on to the browser that allows you to set up various proxy settings and toggle between them on the fly, without having to mess around with system settings on the machine. It really makes the work hassle free. Thankfully, FoxyProxy has a plugin for Internet Explorer, Chrome, and Firefox. If you are using any of those, you are in luck; go ahead and grab it!

Changing the system settings

For those who would rather configure the proxy natively on their operating system, we have provided...

Anatomy of a JMeter test


With the samples we have explored so far, we have seen a similar pattern emerging. We have seen what mostly constitutes a JMeter test plan. We'll use the remainder of this chapter to explore the anatomy and composition of JMeter tests.

Test Plan

Test Plan is the root element of the JMeter scripts and houses the other components, such as Threads, Config Elements, Timers, Pre-Processors, Post-Processors, Assertions, and Listeners. It also offers a few configurations of its own.

Firstly, it allows you to define user variables (name-value pairs) that can be used later in your scripts. It also allows us to configure how the Thread Groups it contains should run; that is, should Thread Groups run one at a time? As test plans evolve over time, you'll often have several Thread Groups contained within a test plan. This option allows you to determine how they run. By default, all Thread Groups are set to run concurrently. A useful option when getting started is Functional Test...

Summary


We have covered quite a lot in this chapter. We have learned how to configure JMeter and our browsers to help record test plans. In addition, we have learned about some built-in components that can help us feed data into our test plan and/or extract data from server responses. In addition, we have learned what composes a JMeter test plan and got a good grasp on those components. In the next chapter, we will dive deeper into form submission and explore more JMeter components.

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
Estimated delivery fee Deliver to United States

Economy delivery 10 - 13 business days

Free $6.95

Premium delivery 6 - 9 business days

$21.95
(Includes tracking information)

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 : 9781782165842
Vendor :
Apache
Category :
Languages :

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
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
Estimated delivery fee Deliver to United States

Economy delivery 10 - 13 business days

Free $6.95

Premium delivery 6 - 9 business days

$21.95
(Includes tracking information)

Product Details

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

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.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
$199.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
$279.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 $ 141.97
Performance Testing with JMeter 2.9
$43.99
Selenium Testing Tools Cookbook
$48.99
JMeter Cookbook
$48.99
Total $ 141.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

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela