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
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Performance Testing with JMeter, 2nd Edition

You're reading from   Performance Testing with JMeter, 2nd Edition Test web applications using Apache JMeter with practical, hands-on examples

Arrow left icon
Product type Paperback
Published in Apr 2015
Publisher
ISBN-13 9781784394813
Length 164 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Bayo Erinle Bayo Erinle
Author Profile Icon Bayo Erinle
Bayo Erinle
Arrow right icon
View More author details
Toc

Handling RESTful web services


An increasing number of applications are shifting to RESTful web services due to their simplicity to build, test, and consume compared to their SOAP counterparts. All REST communication is done over the HTTP protocol between the parties involved. HTTP is used for CRUD (create, read, update, and delete) operations. The built-in HTTP Request sampler in JMeter is more than up to the task. It supports GET, POST, PUT, and DELETE operations, among other things. The body of the request can be in XML or JSON format. An HTTP Header Manager component can be used to send additional HTTP header attributes if needed.

In our sample, we are going to create a new person in our sample application using a POST request, and then verify that the person was actually created using a GET request:

  1. Create a new test plan.

  2. Add a new Thread Group (by navigating to Test Plan | Add | Thread Group).

  3. Add an HTTP Request sampler (this retrieves all the people records in our application so far...

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 $19.99/month. Cancel anytime