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! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
JMeter Cookbook

You're reading from   JMeter Cookbook 70 insightful and practical recipes to help you successfully use Apache JMeter

Arrow left icon
Product type Paperback
Published in Oct 2014
Publisher
ISBN-13 9781783988280
Length 228 pages
Edition 1st Edition
Tools
Concepts
Arrow right icon
Author (1):
Arrow left icon
 Erinle Erinle
Author Profile Icon Erinle
Erinle
Arrow right icon
View More author details
Toc

Table of Contents (16) Chapters Close

JMeter Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. JMeter Fundamentals FREE CHAPTER 2. Handling Responses 3. Building Robust Test Plans with Controllers 4. Testing Services 5. Diving into Distributed Testing 6. Extending JMeter 7. Building, Debugging, and Analyzing the Results of Test Plans 8. Beyond the Basics Installing the Supporting Software Needed for this Book Index

Using Duration Assertion


Another useful assertion component that comes bundled with JMeter is the Duration Assertion component. Like its name implies, this component is used to test that each response returns within a given time specified by the user. Any response that doesn't return within the specified time is marked as a failed response. For example, this can be particularly useful when testing API calls for application services, or ensuring the accumulative service calls to render a page are all performing efficiently.

How to do it…

In this recipe, we will cover how to use the Duration Assertion component. Perform the following steps:

  1. Launch JMeter.

  2. Add Thread Group to the new test plan by navigating to Test Plan | Add | Threads (Users) | Thread Group.

  3. Add the HTTP Request sampler by navigating to Thread Group | Add | Sampler | HTTP Request.

  4. Fill in its attributes in the following way:

    • Server Name or IP: evening-citadel-2263.herokuapp.com

    • Method: GET

    • Path: N/A

  5. Add the Duration Assertion component...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime
Visually different images