I have been a proponent of automated testing for many years now, ever since I discovered jUnit for Java and PHPUnit for PHP. The whole philosophy of running tests before committing a change to a source code repository, to reduce the risks that new bugs have been introduced, makes perfect sense to me.
These frameworks take care of Unit testing, checking that the smallest units of code do what they are intended to do. But Unit testing usually does a poor job at improving user interfaces, and website usability in general. It is quite difficult to simulate a web user’s interaction with the interface produced by a web software, just using unit testing.
Selenium addresses this very issue. You create selenium test scripts by performing the actions you expect your users to perform (including really dumb actions…), add assertions such as “verify that the text […] is on the page”, and re-run the script whenever you want to check the integrity of your user interface.
The first time I tried Selenium testing, back in 2005, I was excited at the idea, but not impressed with it. It was time-consuming, fiddly and unreliable. But I picked it up again a couple of weeks ago, and I found it much, much better. Either I have changed, or the product has changed; or maybe both! In any case, one of the features that really help developing good Selenium tests, is its support of xPath. Using this syntax, it is much easier to locate specific elements on the page, without having to rely on language, or other dynamic features of the page.
Give it a go! There is a great Firefox extension called Selenium IDE, and another called xPather, which should help you develop very useful automated tests.