Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Marcus Baker's Blog:
assert All Swans Are White()
Jun 03, 2005 @ 11:10:53

In this new post on LastCraft today, he makes this statement about testing:

You cannot prove anything by testing. No matter how hard you try, there could always be something wrong, or some combination of conditions or some external event that you haven't thought of. You never know absolutely for sure that your project is working correctly and you never will.

I know several of you out there just thought something to the effect of "yeah, right." immediately, but hear him out, there's a method to this madness.

Life is a little simpler for developers because we are not usually dealing with an infinite black box. It's as if we could see the cogs of a small part of mother nature laid out before us and we are just checking the workmanship. This gives us an alternative approach. If the code is simple enough then we can completely understand it and won't have any bugs. The whole project will probably never be in that state, but small sections of code will. The extra clarity we get doesn't just give us our first theories of how the code behaves, but also allows us to eliminate vast swathes of possible tests as too trivial to bother with.

Of course, he has a point - testing your application can only do so much for you. You can hire people (or spend those late nights yourself) testing everything you can possibly think of, and you still won't find all of the issues.

So, then, the question arrises - how much testing is enough?

tagged:

Link:


Trending Topics: