Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Performance Testing with JMeter, 2nd Edition
Performance Testing with JMeter, 2nd Edition

Performance Testing with JMeter, 2nd Edition: Test web applications using Apache JMeter with practical, hands-on examples

Arrow left icon
Profile Icon Erinle
Arrow right icon
zł59.99 zł141.99
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.7 (7 Ratings)
eBook Apr 2015 164 pages 1st Edition
eBook
zł59.99 zł141.99
Paperback
zł177.99
Subscription
Free Trial
Arrow left icon
Profile Icon Erinle
Arrow right icon
zł59.99 zł141.99
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.7 (7 Ratings)
eBook Apr 2015 164 pages 1st Edition
eBook
zł59.99 zł141.99
Paperback
zł177.99
Subscription
Free Trial
eBook
zł59.99 zł141.99
Paperback
zł177.99
Subscription
Free Trial

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, 2nd Edition

Chapter 2. Recording Your First Test

JMeter comes with a built-in test script recorder, also referred to as a proxy server (http://en.wikipedia.org/wiki/Proxy_server), to aid you in recording test plans. The test script recorder, 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, which is a JMX file. In addition, JMeter gives you the option to create test plans manually, but this is mostly impractical for recording nontrivial testing scenarios. You will save a whole lot of time using the proxy recorder, as you will be seeing 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 will 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(S) Test Script Recorder within JMeter.
  2. Setting the...

Configuring the JMeter HTTP(S) Test Script Recorder

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

  1. Start JMeter.
  2. Add a thread group, as follows:
  3. Right-click on Test Plan and navigate to Add | Threads (User) | Thread Group.
  4. Add the HTTP(S) Test Script Recorder element, as follows:
  5. Right-click on WorkBench and navigate to Add | Non-Test Elements | HTTP(S) Test Script Recorder.
  6. Change the port to 7000 (1) (under Global Settings).
  7. You can use a different port, if you choose 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.
  8. Under the Test plan content section, choose the option Test Plan > Thread Group (2) from the Target Controller drop-down.
  9. This allows the recorded actions to be targeted to the thread group we created in step 2.
  10. Under the Test plan content section, choose the option Put each group in a new transaction controller (3) from the Grouping drop-down.
  11. This...

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 my 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 that you choose. For setting up a proxy, I 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 setting systems 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 these, you are lucky! Go ahead and grab it!

Changing the machine system settings

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

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 the JMeter tests.

Test plan

This is the root element of the JMeter scripts and houses the other components such as Threads, Config Elements, Timers, PreProcessors, PostProcessors, Assertions, and Listeners. It also offers a few configurations of its own.

First off, it allows you to define user variables (name-value pairs) that can be used later in your scripts. It also allows the configuration of how the thread groups that 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 determine how they run. By default, all thread groups are set to run concurrently. A useful option when getting started is...

Summary

We have covered quite a lot in this chapter. You learned how to configure JMeter and our browsers to help record test plans. In addition, you 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, you 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

Description

This book is great 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 JMeter. No prior testing experience is required.

Who is this book for?

This book is great 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 JMeter. 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 performance tests
  • Build realistic, comprehensive, and maintainable test plans
  • Understand distributed testing using Vagrant, AWS, Flood.io, and BlazeMeter
  • Extend JMeter functionality through plugins
  • Understand and effectively use JMeter components to achieve testing needs

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Apr 24, 2015
Length: 164 pages
Edition : 1st
Language : English
ISBN-13 : 9781784395346
Vendor :
Apache
Languages :
Tools :

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 : Apr 24, 2015
Length: 164 pages
Edition : 1st
Language : English
ISBN-13 : 9781784395346
Vendor :
Apache
Languages :
Tools :

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 zł20 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 zł20 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 573.97
JMeter Cookbook
zł197.99
Performance Testing with JMeter, 2nd Edition
zł177.99
SoapUI Cookbook
zł197.99
Total 573.97 Stars icon
Banner background image

Table of Contents

8 Chapters
1. Performance Testing Fundamentals Chevron down icon Chevron up icon
2. Recording Your First Test Chevron down icon Chevron up icon
3. Submitting Forms Chevron down icon Chevron up icon
4. Managing Sessions Chevron down icon Chevron up icon
5. Resource Monitoring Chevron down icon Chevron up icon
6. Distributed Testing Chevron down icon Chevron up icon
7. Helpful Tips Chevron down icon Chevron up icon
Index 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.7
(7 Ratings)
5 star 28.6%
4 star 42.9%
3 star 0%
2 star 28.6%
1 star 0%
Filter icon Filter
Top Reviews

Filter reviews by




Atul Jun 26, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
As I’m Senior QA Engineer i would recommend this book to everyone out there who are looking to get expertize in Performance testing using Apache Jmeter. I purchased Performance Testing with Jmeter - Second Edition; this contains most of topic which can be used to get expertise in jmeter tools. Almost everything is covered with real time examples which make this book different from other out in market.The book not only covers Jmeter topics but also other tools & plugins which can be used with Apache Jmeter.I would appreciate Bayo Erinle and team who came out with book as there are not much resource related to performance testing using jmeter.Last i would say surely go garb it.
Amazon Verified review Amazon
Jason Klueber Jun 26, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I am a software developer for a small IT shop with big plans in the future. As such, I've been researching ways to do automated performance and load testing on our web application. This book, which begins with a business case for JMeter, was an excellent find for me. It steps through areas where JMeter is useful, and provides clear examples for not only how to configure JMeter, but what you're accomplishing by doing so. From a readability perspective, the electronic copy is clear and I did not find any tables or illustrations which overran the page boundaries.For both initial research and early implementation, I can recommend this book as a guide to JMeter.
Amazon Verified review Amazon
Leonardo Mar 16, 2016
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
Excellent book for testers!
Amazon Verified review Amazon
Amazon Customer Jun 11, 2016
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
Good. .
Amazon Verified review Amazon
Alexander P Jul 10, 2015
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
It is good to see the second edition of this book out. There are some improvements and additions, but probably what I wrote about the first edition still makes sense:It is very surprising that actually no decent books about load testing tools were published for 20+ years of their history. So it is nice to see Performance Testing With JMeter by Bayo Erinle published by Packt Publishing.It is, of course, a rather basic book. I don't think that it would be very useful to experienced JMeter users. However, it may be very good for somebody who is doing their first steps in performance testing and need step-by-step tutorial to introduce them into the topic. Perhaps users of other load testing tools may benefit from the book if they want a quick introduction into JMeter (and don't want spent time figuring out what is what in documentation). The book does exactly what the title says: explains one way of how basic performance testing may be done with JMeter 2.9. It doesn't deviate much into available options (which exist in abundance), doesn't talk much about generic principles of performance testing or performance engineering. However, if complemented by more generic performance engineering books, it may be a good starting point for a journey into performance testing (especially considering that no other alternatives worth mentioning available except tool-related documentations and articles).The book is 130 pages long and topics covered may be seen from the chapter names:Chapter 1: Performance Testing FundamentalsChapter 2: Recording Your First TestChapter 3: Submitting FormsChapter 4: Managing SessionsChapter 5: Resource MonitoringChapter 6: Distributed TestingChapter 7: Helpful TipsThese 130 pages include step-by-step instruction (with screenshots) of installing and configuring JMeter, Tomcat (used for resource monitoring), and Vagrant/Puppet/AWS (used for distributed testing).Suggestions to create and run scripts against public sites such as Apache and Google sound rather questionable to me. Providing a sample web site built to accompany the book to run other exercises against looks like a much more interesting and valid approach (assuming that the web site stays up and running).Overall, I guess, the book fulfills its purpose to introduce using JMeter 2.9 for basic performance testing and may be a good starting point for a beginner. Although I am not sure that the author always chooses the simplest ways to introduce topics. And I definitely advise not to stop there if you want to become a good performance tester.P.S. Another book of the same author - JMeter Cookbook - may be a good complement to this book.
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.