Apache-Test and SimpleTest

20 Mar 2005

I've been answering questions lately on the SitePoint forums - PHP, Advanced PHP Programming, and Web Security.

One topic really caught my attention - How many actually use unit testing?. No, it wasn't the grammatical error that caught my eye but rather the fact that unit testing was being discussed on a PHP forum.

While reading the topic, I realized that there were many PHP developers using SimpleTest. Feeling like the black sheep, I mentioned my admiration for Apache-Test. I also tried to surmize why it isn't as popular in the PHP community as it is in the Perl community:

I'm not sure whether the average PHP developer would feel comfortable using it. Its userbase has traditionally been C, Perl, and mod_perl developers writing Apache modules and web applications that utilize many of the Apache API's hooks, etc. These people are comfortable on a command line and are writing some pretty complex code that needs the level of testing purity provided by Apache-Test.

When asked for an example test, I pointed readers to the Apache-Test demo that Geoff and I created last year.

Marcus Baker, author of SimpleTest, replied with the following:

Would you be willing to help with getting SimpeTest working with Apache-test?

I replied that I'd be happy to, and now Marcus and I are going to be working together to make SimpleTest output a TAP compliant protocol.

As Geoff is fond of saying, "Build it, and they will come." Well, hopfully Marcus and I can help make all of Geoff's work worthwhile, and hopefully the PHP community can catch up with the Perl community in terms of testing.