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

Handling HTML responses


HTML responses are by far the most common responses you will get when scripting against web applications in general. That should come as no surprise since the language of the Web is HTML. HTML DOM elements are used to render all the presentation layer of a website. Since most HTML elements have a beginning and closing tag, for example, <html></html>, <head></head>, and so on, their structure closely resembles that of XML documents, which we covered in the Handling XML responses recipe, and hence they are sometimes referred to as (X)HTML documents. They aren't exactly the same, but it suffices to know they are similar. That said, testing them is very similar to testing XML responses.

How to do it…

In this recipe, we will cover how to use JMeter to extract information from HTML responses. 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...