What is PageUnit?

PageUnit is an open source project dedicated to making an easy-to-use yet powerful tool for testing web applications.

PageUnit aims to be a part of the xUnit testing family, of which the best-known member is the JUnit testing framework. However, at this level we are not really doing unit testing, but functional testing (see Evil Unit Testing).

There are many kinds of tests you can do against a web site, including:

  • HTML/XHTML testing - we don't do this. Try the W3C Validator.
  • Spell checking - we don't even think about that. But you should, if you run a web site.
  • Checking that pages load - we do that.
  • Making sure the correct page loads - we do that.
  • Checking for patterns on the page (using regular expression matching) - we do that.
  • ... more here ...
  • Link checking - in a fit of insanity, we sort of do that too.

Quick Start

Download the jar files. Save them in a directory along with this sample test. Run java pageunit.PageUnit test1.txt. Sit back and watch the results.