Skip to content

WPSS Validator Tool Test Cases

irwink edited this page Sep 19, 2019 · 22 revisions

WPSS Validator Tool Test Cases

The PWGSC WPSS Validation Tool combines a number of individual analysis and validation functions into a single tool. This tool provides web developers and quality assurance testers the ability to perform a number of Web site and Web page analysis and validation tasks at the same time. The analysis and validation functions applied to Web sites and Web documents include:

Each of these analysis or validation functions are described in this document.

Limitations

There are limitations within the Validation Tool that may affect the analysis or validation results, these are:

  • The Validation Tool does not support JavaScript. Sites that rely on JavaScript may not be crawled or analysed accurately.
  • The Validation Tool does not use a standard Web browser User Agent name. The Validation Tool may not crawl or analyse sites that rely on the User Agent name accurately.
  • The Validation Tool’s default behaviour is to respect robots directives. If a site has a robots.txt file to prohibit crawlers, then no validation of the site’s documents are performed. You can configure the Validation Tool to ignore robots.txt directives. See the PWGSC WPSS Validation Tool User Guide for more information.
  • The output of some of the individual Validation Tools may be in English only. This tool uses 3rd-party software components. The source of these components is available only in the language that it was authored.

Risks

The Validation Tool includes a crawler that follows links and retrieves web documents from sites. Care should be taken with this tool to:

  • ensure entry page URLs for the sites are accurate so the crawler does not go beyond the site being analysed.
  • ensure that document retrieval from the site being analysed, and any links to other sites, do not impose excessive loads on web servers and the network.

Web Document List

The list of Web documents or URLs that the WPSS Validation Tool analyses can be supplied either in a list or by performing a crawl of a site. Web Site Crawler A Web site crawler module is included with the Validation Tool. It crawls a site to get the list of documents to analyze. The crawler uses the site directory URL and the entry page address for the English and French entry points to perform the crawl.

The site directory URL is the URL of the top level directory or folder containing the site documents. The entry page address is the file name and URL arguments portion of the entry page. The crawler starts at the entry page and extracts any URL references from that page. These can be links, images or any other HTML tag containing a URL. If the URLs are references to other documents in the site, they are added to the set of URLs to analyze. They are in turn retrieved and analyzed for URL references. This process of retrieving and analyzing documents continues until either as the Validation Tool reaches the preset crawl limit, or there are no more URLs to analyze. After analyzing each document for URLs, the other analysis modules of the Validation Tool use that URL information.

A URL is deemed to be part of the site being crawled if the URL matches the site directory URL pattern. If it does not match the pattern, it is assumed to be a document outside the site. This is true for all URL references except those related to JavaScript files and style sheets (CSS files). References to these file types that appear in either a <script> tag or a <link> tag are also considered to be part of the site. This is due to the nature in which these files affect the display and performance of the site.

Password Protected Applications

Web applications typically have a login or authentication page that limits many automated testing tools to only access Web pages outside the login. The Validation Tool has the capability to handle sites or application that employ a single login page with a form for entering credentials, and login pages to get at Web pages behind the login.

By providing the Validation Tool with the URL of the login page, it will:

  • retrieve the login page.
  • locate the login form and form fields.
  • prompt the user for credentials.
  • submit the form to accomplish application login.

Once these steps are complete, the Validation Tool can proceed with crawling for Web documents behind the login. This ensures a more complete site/application analysis. See the PWGSC WPSS Validation Tool User Guide for more information.

Web Server Password Protection

A Web server can be configured to password protect portions of a site. When a user tries to access a protected portion, the Web server returns an “HTTP 401 (Unauthorized)” message. Web browsers prompt the user for credentials to retrieve the Web document. When the Validation Tool receives this message, it can also prompt the user for credentials to retrieve the document.