This topic introduces the Check Links tool, which identifies broken links.

Sections include:

Understanding Check Links

The Check Links tool identifies links in the input that are broken due to missing pages, invalid email addresses, malformed URLs, or server connection problems. It can also identify duplicate anchors and links that point to pages beyond the root of the site.

This tool can be chained to a Browser Playback tool to check links at a given test step. 

Links can also be checked when performing static analysis of specific files (see Performing Static Analysis) or when functional test suites execute (see Configuring SOAtest to Run Static Analysis on Web Scenarios). To check links during static analysis, use the "Include only Valid Links" rule, which is in the Check Links category. This rule has the same customization options as the Check Links tool.

Customizing Check Links

You can customize the following options:

  • Check mailto addresses: Determines whether SOAtest tries to verify the validity of mailto addresses in your files. Note that many mail servers refuse to validate email addresses for security reasons.
    • If you identify yourself by entering your own email address (for example, [email protected] or [email protected]) in the Check email as field, mail servers are more likely to return correct information.
  • Verify missing pages: Determines whether SOAtest uses an HTTP connection to verify if pages that appear to be missing (based on the current Project tree contents) are actually missing. When Check Links sees a link to a page that is available in the current Project tree, it knows that the link will work without having to check it. When Check Links sees a link to a page that is not available in the current Project tree, it will not check that link unless you have enabled this option.
  • Follow meta refresh and JavaScript redirects: Determines whether the Check Links tool checks pages redirected to by meta refresh links and JavaScript redirects. You must enable this option if you want Check Links to report errors A) when meta refreshes and JavaScript redirects are not working correctly (for instance, a redirect leads to a missing page instead of the intended page), and B) when navigating to a broken link causes the server to respond by returning a page that contains a meta refresh link or JavaScript redirect to a designated error page that you listed in the Check Links tool Report links to these URLs as errors list.
    • For example, assume that your server is configured so that when a user navigates to a broken link, the server should respond by returning a page (http://www.parasoft.com/redirect.htm) that includes a meta refresh link or JavaScript redirect to a designated error page (http://www.parasoft.com/oops.htm), which the client then shows to the user. Also assume that you have indicated that links to http://www.parasoft.com/oops.htm should be considered to be errors and that you have enabled the Follow meta refresh and JavaScript redirects option. If your home page has a broken link to your products page, attempting to navigate to that page will cause the server to return the page http://www.parasoft.com/redirect.htm, which redirects to http://www.parasoft.com/oops.htm. SOAtest will report the link to the products page (<A HREF="products.htm">Products</A>) as a broken link. Your home page, http://www.parasoft.com/index.htm, will be considered the source of this broken link.
    • For another example, assume that your server is configured so that users who click a "purchase" link after viewing a special presentation should be sent a page with a meta refresh link or JavaScript redirect to the purchase page (this configuration helps you track how many users decided to purchase after viewing the presentation). Also assume that you have enabled the Follow meta refresh and JavaScript redirects option. If users who click that purchase link are sent a page (http://www.parasoft.com/redirect.htm) that contains a meta refresh link or JavaScript redirect to the purchase page (http://www.parasoft.com/purchase.htm), but the redirect/link is broken, then SOAtest will report the link to the purchase page (<A HREF="purchase.htm">Purchase</A>) as a broken link, and indicate that the page at http://www.parasoft.com/redirect.htm is the source of this broken link.
    • SOAtest will only follow meta refreshes whose delay is less than or equal to the delay specified in the Maximum refresh delay field. Delay settings are not applicable to JavaScript redirects.
  • Check the following categories of errors: Determines what types of errors Check Links tests for. Available error categories are:
    • Malformed URL: A link to a URL that uses non-standard URL format, a URL that contains a new line character (that is, the URL is split between two lines), or a URL that uses the incorrect type of slash.
    • Bad Anchors: A link to a duplicate or missing anchors.
    • Broken Link: A link that does not lead to the specified location or links to pages specified in the Report links to these URLs as errors area.
    • Unreachable Host: A link that leads to a Web server which has been physically disconnected from the network.
    • Missing Host: A link to a machine whose domain name (DNS name) has never been registered with network authorities (and is therefore invalid).
    • Page Beyond Root of Site: A link to a page that appears to be located beyond the current site’s root, for instance, if http://www.parasoft.com/index.htm contains a relative link such as <A HREF="../../../noaccess.html”>, noaccess.html would be reported as a page beyond root of site.
    • Server Connection Error: A link that leads to a Web server which is either inactive or not working properly. This occurs when the Web server machine has a valid domain name (DNS name) and is physically connected to the network, but has a problems with its Web server software.
  • Report links to these URLs as errors: Lets you record which URLs indicate that an error has occurred. Any time SOAtest finds a link that points to a URL in this list, it will report a broken link error so you can easily determine when errors occur. You can click Add to add individual URLs, or you can click Import to import a list of URLs from a text file.
  • No labels