The Open University has been writing unit tests for some of the stuff they've been working on. Some of it is for internal integration but they have said they'd make their other tests available once they've met internal deadlines and got some spare time.
It's certainly a good idea for all Moodle developers to be contributing to a single unit test bank using the same testing tools. Hopefully leading to more happy moments like this one.
There's a thread here which starts off talking about automating the type of User Interface test that Helen linked to in the Docs, but then diverges onto discussions about unit testing and the type of tools people are currently using.
I actually think that testing with a tool like Selenium is crucial as a complementary approach. It's all gone a bit quiet on that front though I did see someone talking about using it to test backup.