Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • JMeter Cookbook
  • Toc
  • feedback
JMeter Cookbook

JMeter Cookbook

By : Erinle
3.6 (8)
close
JMeter Cookbook

JMeter Cookbook

3.6 (8)
By: Erinle

Overview of this book

This book is great for you if you are a developer, quality assurance engineer, tester, or test manager who is looking to get a firmer grasp of elementary, deep, and advanced testing concepts using Apache JMeter. It’s assumed you have access to a computer and an Internet connection. No prior testing or programming experience is required, but would be helpful.
Table of Contents (11 chapters)
close
10
Index

Using Regular Expression Tester


When trying to extract parts of a server response through a regular matching expression, Regular Expression Tester is your best friend. This component allows you to test your regular expression patterns directly on the sampler response data. Without such a component, it will be daunting to nail down the exact regular expression to fulfill your matching needs. This component comes bundled as part of the View Results Tree listener.

How to do it…

In this recipe, we cover the use of Regular Expression Tester:

  1. Launch JMeter.

  2. Open the ch2_regex_tester.jmx test script located in the scripts/ch2 directory.

  3. Run the test plan.

  4. Click on the View Results Tree listener.

  5. In the bottom-left corner of the View Results Tree listener, select the RegEx Tester option.

  6. In the Regular expression textbox, enter a regular expression to extract information from the server response. We can proceed in the following way:

    • Let's say we wanted to extract the xsrf token; we will use the regular expression...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech
bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete