Jmeter-Handle Hyperlink in jmeter


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.

threadgroup

Now we define the sample request like HTTP request.

httprequest

Now we define post processor extractor where we extract all the links from the main page.

extractpage

now we define HTTP request with foreach controller and we will define regular expression inside HTTP request.

linkreq

Now we run the Jmeter and easily can see the result in listeners.

viewresultree

Enjoy.

If you have any query regarding jmeter please comment on my post.

Thanks.

Advertisements
This entry was posted in JMeter, Scala and tagged , , , , , , . Bookmark the permalink.

2 Responses to Jmeter-Handle Hyperlink in jmeter

  1. glinius says:

    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.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s