This topic introduces the Check Links tool, which identifies broken links.
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.
- 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.
- 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 (i.e., 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 contains a rela-tive 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 use the Add button to add individual URLs, or you can use the Import button to import a list of URLs from a text file.