Testing Websites Automatically

Java-based tools

In conjunction with junit can’t help but recommend httpunit which supports the retrieval and parsing of web pages, cookie handling and limited javascript testing. This tool proved invaluable while developing a bi-lingual e-commerce site and enabled delivery to client with minimal testing required on their part.

Javascript

jsunit is handy little tool to test all those Javascript functions and ensure you get them working to spec.

PHP-based tools

Simpletest has some nice features for unit testing, with a design based on junit. Also has web testing functionality allowing you to automate the testing of links, page content, form submission, cookies, etc. Used a great deal in the book php|architect’s Guide to PHP Design Patterns.


In-browser testing tools

IE Web Accessibility Toolbar – the Accessible Information Solutions – Web Accessibility Toolbar is an extremely useful IE toolbar that allows you to:

  • identify components of a web page (i.e. outline all DIV’s or table cells)
  • facilitate the use of 3rd party online applications
  • simulate user experiences (i.e. simulated Glaucoma)
  • provide links to references and additional resources (i.e. easy links to online Validation tools)

Firefox Web Developer Extension – much like the above IE toolbar, but for Firefox, this toolbar allows you to visualise page element locations such as div’s or spans, display their pixel sizes, and includes easy-access links to online validation tools from the W3C and CynthiaSays and much more – a must-have tool.


Online Validation Tools

If you’re not using the above toolbars (or can’t, because they don’t exist on your platform), then you may find the following links useful:

Local Validation

Run the W3C’s own HTML Validator on your local machine (saves you having to send potentially confidential pages across the web to a public validation service)

Or use the Firefox HTML validator extension (based on Tidy). This runs Tidy on the HTML and can display a green tick or yellow exclamation mark in the status-bar – instant validation of every page viewed! The only slight downside is that Tidy doesn’t catch quite as many errors as the W3C validator.


Multiple installations of Internet Explorer

having more than one version of IE is possible and was a faff, but now there’s an even easier way:

http://tredosoft.com/Multiple_IE