UKOLN AHDS A URI Interface To Web Testing Tools



Background

As described in other QA Focus briefing document [1] [2] it is important to ensure that Web sites comply with standards and best practices in order to ensure that Web sites function correctly, to provide widespread access to resources and to provide interoperability. It is therefore important to check Web resources for compliance with standards such as HTML, CSS, accessibility guidelines, etc.

This document summarises different models for such testing tools and describes a model which is based on provided an interface to testing tools through a Web browsers address bar.

Models For Testing Tools

There are a variety of models for testing tools:

Although a variety of models are available, they all suffer from the lack of integration will the normal Web viewing and publishing process. There is a need to launch a new application or go to a new Web resource in order to perform the checking.

A URI Interface To Testing Tools

A URI interface to testing tools avoids the barrier on having to launch an application or move to a new Web page. With this approach if you wish to validate a page on your Web site you could simply append an argument (such as ,validate) in the URL bar when you are viewing the page. The page being viewed will then be submitted to a HTML validation service. This approach can be extended to recursive checking: appending ,rvalidate to a URI will validate pages beneath the current page.

This approach is illustrated. Note that this technique can be applied to a wide range of Web-based checking services including:

This approach has been implemented on the QA Focus Web site (and on UKOLN's Web site). For a complete list of tools available append ,tools to any URL on the UKOLN Web site or see [3].

Implementing The URI Interface

This approach is implemented using a simple Web server redirect. This has the advantage of being implemented in a single place and being available for use by all visitors to the Web site.

For example to implement the ,validate URI tool the following line should be added to the Apache configuration file:

RewriteRule /(.*),validate http://validator.w3.org/check?uri=http://www.foo.ac.uk/$1 [R=301]

where www.foo.ac.uk should be replaced by the domain name of your Web server (note that the configuration details should be given in a single line).

This approach can also be implemented on a Microsoft IIS platform, as described at [3].

References

  1. Compliance with HTML Standards, QA Focus, UKOLN,
    <http://www.ukoln.ac.uk/qa-focus/documents/briefings/briefing-01/>
  2. Use Of Cascading Style Sheets (CSS), QA Focus, UKOLN,
    <http://www.ukoln.ac.uk/qa-focus/documents/briefings/briefing-34/>
  3. Web Site Validation and Auditing Tools, UKOLN,
    <http://www.ukoln.ac.uk/site/tools/>