The idea behind the SiteMesh testsuite is that a full unit test can be performed on SiteMesh for all servers in one step. Whenever any changes are made, the full test-suite should be re-run. When new features are added, the test-suite should be modified and then SiteMesh modified until the tests pass again.

It consists of:

What are the standalone tests?

The standalone tests consist at this moment mostly out of tests that try to break the HTMLPageParser by throwing a whole lot of very badly written HTML pages at it. Take a look at the testsuite/parser-tests directory for the testcases. Make sure you read the readme.txt file in that directory before you start writing your own tests. Here is a small overview of what we currenly test for:

If you would like to ignore certain tests (because they would break (fail) the nightly build), put the file name in the ignore.txt file.

Each time a modification is made to SiteMesh or the test-suite run 'ant test-standalone' (it will recompile and use the modified SiteMesh sources).

How do I test on multiple containers?

First, install all the app-servers/servlet-engines you wish to test with. The servers don't need to be on the same machine - so long as you can access the directory the web-apps are to be deployed to, they can be on other machines on the network.

Build the web-app with 'ant webapp-build'. Deploy the resulting .war file in the dist directory to each server. Fire up all the servers (and leave them running). Make sure they are not all trying to listen on the same port :)

Edit tests.xml. For each server, an entry should be made saying where the web-app is deployed to on the filesystem (the app can be a .war, .ear or unpacked directory) and what the URL to access it is.

Each time a modification is made to SiteMesh or the test-suite a two step process must be performed:

  1. Run 'ant deploy' to rebuild the web-app and redeploy it to each server.
  2. Run 'ant test' to run the testsuite against the new server.

It is important that the deployment process has completed on all servers before running the second step - this takes longer on some servers.

This page is under construction