There are some packages for automated desktop testing available at
They are based on Marc Tardiff's hwtest package. In fact, a custom version of the hwtest package is included in this PPA, temporarily, until it gets included into Ubuntu proper (hopefully hardy).
To use these, follow the instructions on the PPA page to change your sources.list, then install hwtest-desktop and hwtest-desktop-dogtail-tests.
These packages are not currently being released, meaning that they don't always get a new version number every time they are uploaded. Sorry about that. Because of this, you may want to purge the packages and then reinstall them from scratch to upgrade.
The current state of the packages (from around February 2008) is at: http://files.liw.fi/temp/hwtest-packages.tar.lzma
For additional information, ask LarsWirzenius.