Test Driven Design with PHP from the Bottom Up

June 24, 2005

Lately I've been deep in the world of reading Unit Testing, and Refactoring books and articles, namely Test-Driven Development by Kent Beck, and Refactoring by Martin Fowler (both great books). I've dabbled around writing unit tests AFTER I finished my work and went through my normal browser testing, however this time I'm going to start a little project using Test Driven Development. I'm not going to code a line of implementation code unless I have a test that requires code. After being in "bugfix" mode at work for 5+ months I'm buying deeply into TDD as I have been supporting other people's crappy code for too long now. This little project is just a fantasy web services project. Here are the details...

Use Case:
An automated system needs to be able to read xml data from a file in a specific location, send that data to a 3rd party website that will log the data and record any errors that occur. The system should also be able to connect to the 3rd party website and gather data and return it to the client machine as a saved file to be retrieved later by the clients legacy system.

I'm going to use Marcus Baker's excellent tool SimpleTest, and I'll be posting my findings in an upcoming write up.

Comments

RSS feed for comments on this post.

  1. Jason Sweat says:
    June 24, 2005 @ 14:18 — Reply

    Go for it! I hope you become test infected :) Keep us posted on the results.

  2. Jim says:
    June 24, 2005 @ 15:58 — Reply

    Hey Jason, thats funny you posted.. I JUST purchased your soon to be released book on php|a about 3 minutes ago :) Can't wait to get my hands on it, is it all finished or are you still working out the details?

  3. Eddie Peloke says:
    June 25, 2005 @ 14:44 — Reply

    Yep, you will like SimpleTest. I am still trying to get into the TDD set of mind as I find that I still tend to write my tests after coding....but am trying to change. I just got my test put into an ant script last week which runs daily off a cron job so I don't even have to worry about it anymore. Tweaked the simple test base classes so I am emailed on failure and now I can just keep adding to the test suite and it will let me know when something fails.

  4. Louis Vuitton handbags says:
    June 16, 2010 @ 01:46 — Reply

    Comment pending moderation

Leave a Comment

Line and paragraph breaks automatic, HTML allowed: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <code> <em> <i> <strike> <strong>

Comments disabled due to spammers being losers that lead sad lives.