Archive for February 6th, 2010

06
Feb

Quality Control

There’s a most excellent set of posts to read over at CocoaWithLove on unit testing your Mac/iPhone apps … and why not to!

In my last two posts, I’ve shown a Mac app with full unit tests and an iPhone app with full unit tests. The reality though is that I do not write or test code this way. In this post, I look at why so few applications are actually developed using unit tests. I’ll also look at the alternate approaches — both manual and automated — that are normally used to maintain high quality and low bug rates in application development.

Must read, indeed. Personally, since pretty much everything we write here is handled by ourselves and completely user-driven to boot, it’s rather hard to make a case for devoting the time to a formalized unit test regime; what fits our developing style is a kind of extreme iterative testing. Which works perfectly well … when you’re working on your own, and your apps aren’t data driven. So we’re always on the lookout for sensible ways to scale up the process — whilst avoiding the “what do you mean all the !(@#$^!!! tests are eight months out of date?” problem — and this is a not miss set of insights on that!

PS: And while we’re on the subject of unit testing, here’s a handy tip about using OCMock with asynchronous callbacks, handy if you need it…