View Full Version : Testing HTML links/content integrity


Palidork
06-24-2004, 07:03 AM
I have become aware of an HTML testing framework (http://htmlunit.sourceforge.net/) for Java that integrates seamlessly with other testing units such as HTTPUnit (http://httpunit.sourceforge.net/) and JUnit (http://junit.sourceforge.net/).

This fantastic tool is called: HTMLunit (http://htmlunit.sourceforge.net/)

What it allows for is the threaded testing of hyperlinks, beans, responses, jscript, web applications and even site content.

Most useful of the above is the threaded hyperlink testing as it allows for the following:

Traversal of links in a multithreaded fashion. (Each link from the index page is passed to a thread, each link on the subsequent pages are passed onto further threads. This continues until a thread links back to a previously visited page in that respective "threadstack".)

Link traversal can be limited to a specific domain or used to check backlinks.

Reporting of broken or incorrect links, absense of backlinking etc.

Fully customizable tests.

It becomes an EXTREMELY powerful tool when leveraged with JUnit (for web applications testing purposes.) or with HTTPUnit (for load testing purposes) or even BOTH (for the testing of web applications in a load environment.)

Note: These frameworks are best leveraged in a tiered fashion. The testing should be planned from the inception of the project and commenced throughout to maintain integrity and accuracy of the project as it proceeds rather than in a "code, debug and recode" fashion.

Finally, with the addition of other frameworks or by integrating these frameworks into CVS or SourceSafe one can commence automated testing. Imagine being able to upload a page then just leave it in the hands of a trusty watchdog that can make sure the site is up, that it's content has not changed, and that all of the links (internal and external) are still accessable.

Wonderful days these.

seo guy
06-27-2004, 01:23 AM
Interesting, perhaps we should start cooking up a tool!

Palidork
06-30-2004, 04:58 AM
I just ran a few of my ideas involving some of the applications of this technology by my employer and they are extremely interested in it's practical and powerful implications.

So as soon as I am finished with my current project (which is WAY ahead of schedule thanks) he want's me to develop a proof of concept and present it to the board!

;)