June 16
Another late update.
Things have gotten more complicated in the last week with my shift to the more complicated classes. The need for a completely portable SQL independent testing package has driven me to try integrating an XML dump of the Geeklog database with the testing package. This offers a few benefits; one is that XML has a relatively simple structure that PHP handles very well with simpleXML and XPath. Once the class that I’m working on (handling XML ‘databases’ with simple commands) is finished, I’ll be able to put a variety of XML databases with different configuration values with the test packages to test a variety of situations in a much cleaner way than say, stubbing every function and test class. I’ve also created a simple GUI for PHPUnit and Geeklog, because the configuration of the tests package has some quirks that would make it a hassle for any developer or client to work with otherwise.
It’s looking like progress on actual code coverage may be slower than I expected; the concepts of PHPUnit are simple, but difficult to integrate in the environment. Hopefully things will speed up once I finish work on the XML connections and have a better understanding for Geeklog’s organs, but I’m pretty impatient right now. Given that my project’s focus is primarily setting up a testing framework, I’m focusing most of my attention on that right now. Other developers will probably be more efficient at testing the code than I am currently, but we might be equally matched in the actual effort put into setting up the system.
In the near future, I’m planning on putting out some documentation on PHPUnit basics and how the developers will be able to use it with Geeklog. I’m also looking into the possibility of rewriting the database classes to work with XML, and finding a way to trick Geeklog into using those in the testing environment (rather than interacting with the database simply to retrieve cleaner stubs).
Nonetheless, it’s fascinating (to me) work, and I’m thoroughly enjoying it (although it definitely does have an acquired taste). I’m quite excited about where this test package is going – it’s something like watching your child grow and mature as you invest yourself in their life. Perhaps?
