Bill Bumgarner

2005-3-29

Unit Testing article at ADC

The Apple Developer Connection has published an article covering Unit Testing of Objective-C with OCUnit.

I have been using OCUnit for quite a while to tremendous benefit. Having OCUnit integrated into the development process in such an intimate fashion has resulted in much higher quality products with a lot less churn-- integration churn, regression churn, cluelessness churn-- and, overall, significantly more pleasant development cycles.

While I choose to use OCUnit for a variety of reasons, not the least of which is that I have been using it for many years, the recently (by comparison) released UnitKit is also quite nice. And, as Duncan said, "If you don't test with UnitKit [or OCUnit, TestKit, JUnit, PyUnit, etc..] please at least test. Unit testing is probably the single most effective thing that you can do to improve the quality of your code."

Speaking of PyUnit, you can also unit test Objective-C from Python via PyObjC. Jiva DeVoe wrote an excellent article on doing just that. Python based unit testing have the advantage of an extremely quick turnaround time, but suffer from the inability to debug in the same language that the code being tested is written in.

Good stuff.

Comment on this post [ so far] ... more like this: [Mac OS X, Objective-C, Technology, Unit Testing] ... topic exchange: [Mac OS X, Objective-C, Technology, Unit Testing]