Categorized | Best practices, News

What is Unit Testing?

Posted on 20 June 2005 by Demian Turner

You might be surprised to hear that some developers have no idea what unit testing is – I know I was, but I have recently spoken to a suprising number of people who had never run across the ‘concept’.

I do have the advantage that one of the key proponents of unit testing and PHP, Marcus Baker, is a founding member of PHPlondon whose meetings I attend regularly, so I’ve had a pretty good exposure to testing and agile methodologies in general.  At work we have also been quite ‘test infected’ for some time now, this became more obvious recently when we had to complete an assignment where no testing framework was accessible, and quickly realised how dependent we had become.

For a good overview of the SimpleTest framework check out this excellent introductory article (cancel the print dialogue, this view is easier to read than the paged one), before heading over to Marcus’ extensive docs on the SimpleTest website.  SimpleTest is also available as a PEAR package which can be downloaded from the SF site.

Give it a try, see if you get addicted, can test-driven development work for your organisation? Also be sure check out Mock objects for help with isolating layers and resources in your application.

Bookmark and Share

Leave a Reply



Demian Turner's currently-reading book recommendations, reviews, favorite quotes, book clubs, book trivia, book lists



PHPkitchen recommends you also check out the following sites :

Accounting for Small Businesses

FreeAgent sign-up