Wednesday, April 1, 2009

Unit Testing Tips and Techniques for iPhone

"...Unit tests help ensure low-level code correctness, reduce software development cycle time, improve developer productivity, and produce more robust software."
-Unit Test Frameworks

As important as unit tests are to modern development efforts, the iPhone SDK makes it difficult, if not impossible, to introduce unit tests. However, there are some useful resources online that can help developers shoe-horn a unit test framework into the SDK. One of these is based on the "Google Toolbox for Mac" project. They've extended their toolbox to provide iPhone Unit testing. You can find their well-written HOWTO at the iPhoneUnitTesting page.

The other resource I suggest you look at is from the folks that brought the OCUnit framework to Apple's Xcode. At the iPhone Unit Testing page of their website, you'll find the history of OCUnit and precise instruction on how to get it to work with the iPhone despite Apple having put OCUnit into iPhone SDK 2.2.!


Post a Comment