I ran across this; it looks like it could simplify the coding process quite a bit. I'll be playing with it for the next few days and see how it works.
http://sourceforge.net/projects/simpletest/
http://simpletest.sourceforge.net/
Here is a tutorial article on using it for a common task:
http://www.phpmag.net/itr/online_artikel/psecom,id,613,nodeid,114.html