JMeter is an open source pure Java based tool designed to load test functional behavior and measure performance. The basic use of this tool is to test web applications; however, its usage has expanded to other test functions. Anyone performing automated testing has a fair knowledge about the tool, but sometimes using Regular expressions proofs to be challenging, especially while handling hyperlink in a webpage.

Considering a scenario where you need to check all the links using JMeter and also the time to load all the links, this could be quite difficult. However, you can follow the below mentioned steps to handle hyperlinks in a webpage using regular expression easily.

  1. Create a thread group.image001
  2. Define the sample HTTP request.image003
  3. Extract all the links from the main page by defining post processor extractor.image005
  4. Define HTTP request using the foreach controller.
  5. Define Regular expression inside HTTP request.image007
  6. Run JMeter and see the result in listeners.image009