4. Testing

I don't even want to think about how much heat I'm going to get for what I write here but hopefully the testing zealots will agree with me that a heuristic approach to testing is better than a half-assed, or non-existent approach to testing. So, without further ado...

I'm going to assume that you're being good about maintaining a strict MVC (Model View Controller) separation in your app. If not please imagine that I have just walked up beside you, smacked you up-side the head and told you to ``Stop being stupid!'' If you don't know what MVC is Wikipedia has a good article on it. http://en.wikipedia.org/wiki/Model-view-controller

If you Google around you'll see that the prevailing opinion is that you should test everything and that you should be striving for 100% test coverage. And, while this is good, and a laudable goal, for most developers this just isn't realistic, for a variety of reasons both personal and environmental. The practice of test driven development (TDD) , or the more recent behavior driven development (BDD) is a great idea, and if you can manage manage it I highly recommend it. But, as much as we'd like to promise ourselves that we'll start doing this right away, most of us know deep down inside that that's a pile of bull. So, instead of an all or nothing approach I'm going to advocate the rarely mentioned heuristically driven development (HDD) approach. It's rarely mentioned because I just made it up. But, HDD, like any other methodology, depends on you understanding its basic concepts, which happen to be the same as the other testing methodologies. So, before we get on with what HDD really means (see section sec:Heuristic-Driven-Development ) we need to cover those basic concepts, which you're hopefully already familiar with.

If you have the discipline, or your boss is forcing you, to do TDD development you can skip this chapter entirely. Many congratulations to you for doing things the best possible way. If you're like me, keep reading...



Subsections
K. Rhodes 2007-05-18