On Dec 5, 2006, at 10:53 AM, Matt Neuburg wrote:
Could someone please give me instructions for writing a Cocoa/ObjC unit test
that actually work?
First I followed the instructions in this document:
These instructions are out of date with respect to the integrated unit testing support that was included as part of Xcode 2.1 and later. It was written before Tiger shipped, for Xcode 1.5 and the Sen:te distribution of OCUnit, and hasn't been updated.
I've made several posts related to Xcode unit testing on my weblog since the release of Xcode 2.1 describing in depth how to use it for a variety of purposes.
Unit Testing Cocoa frameworks
Debugging Cocoa Framework Unit Tests
Unit Testing Cocoa Applications
Debugging Cocoa application unit tests
Trust, but verify.
Unit testing Cocoa user interfaces: Target-Action
Unit testing and Core Data
I know others have written about unit testing with Xcode and OCUnit as well. A web search should turn up others' posts. There are also sections on unit testing in some of the recent Xcode books, in addition to the Xcode Unit Testing Guide.
-- Chris