Book Image

JMeter Cookbook

By : Bayo Erinle
Book Image

JMeter Cookbook

By: Bayo Erinle

Overview of this book

Table of Contents (16 chapters)
JMeter Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Using REST Sampler


As we explained in Chapter 4, Testing Services, Representational State Transfer (REST) is an architecture style of designing networked applications that relies on stateless, client-server, cacheable communications protocol (HTTP). It is lightweight and easily testable mainly because all communications between client and server are over HTTP.

More information about REST can be found at http://en.wikipedia.org/wiki/Representational_state_transfer.

How to do it…

In this recipe, we will cover how to test REST web services with the REST Sampler extension. The main feature of this extension is to allow us to interact with services that work only on XML. As such, it allows us to deal with XML payloads easily.

Note

REST Sampler can also be used with a service that consumes and produces JSON.

  1. Download the Extras with Libs set of plugins from http://jmeter-plugins.org/.

  2. Install the plugins by doing the following:

    1. Extract the ZIP archive to the location of your choice.

    2. Copy the ExtrasLibs...