We already know how to Jmeter works but some time we face the problem how to use Regular expression.So this time i just explained how to handle hyperlink in a webpage using regular expression.
Suppose we have a scenarios like we have to check all the links in a website using jmeter and also we want to know the loading time of all the links in the site.So first of all we create a thread group.
Now we define the sample request like HTTP request.
Now we define post processor extractor where we extract all the links from the main page.
now we define HTTP request with foreach controller and we will define regular expression inside HTTP request.
Now we run the Jmeter and easily can see the result in listeners.
Enjoy.
If you have any query regarding jmeter please comment on my post.
Thanks.
Reblogged this on manojknol.
And what if first attribute is not “href”? Your regular expression won’t match the link and it will be not processed. In general parsing HTML with Regular Expressions is not a very good idea so I would recommend using CSS/JQuery Extractor or XPath Extractor instead.