O'Reilly logo

JMeter Cookbook by Bayo Erinle

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Handling JSON responses

When testing most of today's modern web applications, an often-encountered response from the server is a JSON payload. JSON (JavaScript Object Notation) is a lightweight data-interchange format that is easy for humans to read/write, and also easy for machines to generate and parse. Due to this ease and its language neutrality, a lot of interchange with servers and services is carried out in this format.

How to do it…

In this recipe, we will cover how to use JMeter to extract information from JSON responses while consuming a freely available weather service. 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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required