Testing is fun
I’m way behind the “good development” curve on this, but I just discovered the wonder and power of a good and simple test framework. I’m using SimpleTest, which provides some powerful features that are dead simple to use. I can drive the site programmatically using the real forms, and look for text patterns in the returned pages to make sure I am getting back the right data. I’ve written some test cases to cover the creation of a new account, including various error conditions, and the subsequent changing of account settings.
It makes me excited whenever “the machine” does rote work. Rather than me running through some basic steps to test the site, or even worse not running through them, the machine is doing this for me, very completely and thoroughly, without my intervention. More work for the machine is good.
On about 10 occasions, something new I made broke something old. Now I won’t have to worry about that as much, so long as these tests are run before I upload. It’s very freeing.