JMeter: Handling Hyperlinks With Regular Expressions
Here's a brief post on how to handle hyperlinks in JMeter using regular expressions for testing.
Join the DZone community and get the full member experience.
Join For FreeWe already know how JMeter works but sometimes we may face the problem of how to use regular expressions. So this time around, I'll explain how to handle a hyperlink on a web page using a regular expression.
Suppose we have a scenario where we have to check all the links on a website using JMeter and also we want to know the loading time of all the links on the site. So, first of all, we create a thread group.
Next, we define the sample request like an HTTP request.
Now we define the post processor extractor where we extract all the links from the main page.
After that, we define the HTTP request with a foreach controller and we'll define the regular expression inside the HTTP request.
Now, we run JMeter and can easily see the result in listeners.
Enjoy!
If you have any query regarding JMeter please comment on my post.
Thanks.
Published at DZone with permission of manoj mathpal, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.
Comments