Home > Software design >  Test a website to see if all the links/URL's (XHR URL's) are working fine
Test a website to see if all the links/URL's (XHR URL's) are working fine

Time:03-25

It may sound like a naive issue but I can't find a perfect solution for this.

My solution:

  1. Copy every single URL.
  2. Paste it in Jmeter.
  3. Run Jmeter after every build.

Surely, there must be a better solution.

CodePudding user response:

I am not sure if this fit to your question. On my end when I test and search for broken links to my website I used "xenulink" tools. It is a bit old but still works fine on my end

Cheers

CodePudding user response:

JMeter comes with HTML Link Parser which can be used for automatic checking for "dead" links

Spidering Example

Consider a simple example: let's say you wanted JMeter to "spider" through your site, hitting link after link parsed from the HTML returned from your server (this is not actually the most useful thing to do, but it serves as a good example). You would create a Simple Controller, and add the "HTML Link Parser" to it. Then, create an HTTP Request, and set the domain to ".*", and the path likewise. This will cause your test sample to match with any link found on the returned pages. If you wanted to restrict the spidering to a particular domain, then change the domain value to the one you want. Then, only links to that domain will be followed.

You may also find How to Spider a Site with JMeter - A Tutorial article useful.

  • Related