Handling XML responses

Sometimes, the responses coming from the server are in XML format. Knowing how to handle such responses to extract the information needed by your scripts is an important aspect of building dynamic and robust scripts. Such scenarios might involve consuming web services or doing data manipulation to post to an external data source.

How to do it…

In this recipe, we will cover how to use JMeter to extract information from XML 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 sampler by navigating to Thread Group | Add | Sampler | HTTP Request.
  4. Fill in ...

Get JMeter Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.