Checking links on a web-page is important in at least two aspects. Firstly: SEO. Google doesn’t like to forward people to a page where there are broken links. Thus if you care for your page-rank in google organic search results you need to check links regularly.

Secondly it’s not a professional appearance in front of your customers and partners to provide non-working links.

Of course there are specialized tools to take care of testing all you links. In case you anyway run some automated test cases using baangt, you get this additional functionality for free. No separate tool needed. Not an additional task to keep track of, update or pay license for. baangt offers link checking as built-in functionality. It’s one one of many convenience features, that make your life a little more efficient. In case you didn’t install baangt yet, maybe download it while you read the rest of the article!

How link checking works in baangt

It can’t be simpler! checkLinks is a command like any other command within test case definition, like If, EndIf, SetText, Click, etc. At any page you anyway visit through your test case, simply add one line with checkLinks command. That’s it. baangt finds all links of the current page and visits them in a separate mode. If there’s one or more dead link from the page, the test case result is automatically set to “failed”. As usual we will show all results (also the working links) in the result sheet.

Under the hood

Link checking is not too complex. Each link in each page can be identified by an HTML-Tag. baangt reads the HTML-Source code of the current web page, identifies the relevant tags and visits the corresponding pages. The result is determined within standard timeout settings for each URL. Finally the program combines all single results into one attribute for each test record.

A cheap alternative to expensive or unpleasant online tools for link checking

Even if baangt was not designed to specifically check links, it can be fun to use it like that. Here’s a setup (you can find it in examples folder of baangt) where we use baangt test automation software purely as link checker:

Link checking as a gimmick with baangt test automation software

Where to next?

Well, maybe you get the idea that if baangt is so powerful in test automation and provides features like checking links, that there could be more. More meaning to use baangt for web-scraping. baangt was never intended for that purpose, but people use it for web-scraping anyways. Especially as baangt includes feature like proxy-rotation and dynamic loops. On the other hand what’s the big difference between test data automation and web scraping? In the first case of test data automation we already know what the output should be. We compare the actual result to our assumption. In the second case of web-scraping we have no idea, what the output will be, but we know again, which sequence of steps is needed to reach this (unknown) output. Looking at the software from this angle shows suddenly an ideal code-free web-scraping tool.