There are a lot of good tutorials on unit testing with XCode. What you will probably need is a good mocking framework for the interaction.

A list from this list:
http://www.mail-archive.com/cocoa-dev@lists.apple.com/msg09642.html

OCMock:
http://www.mulle-kybernetik.com/software/OCMock/

Once you get past the initial phases another good tool is the Google Toolbox (for iPhone Unit Testing) and Hamcrest for better asserts.

Hamcrest: http://code.google.com/p/hamcrest/
Google Toolbox: http://code.google.com/p/google-toolbox-for-mac/

Scott
On Jul 25, 2009, at 1:17 AM, lorenzo7...@gmail.com wrote:

I'd like to add unit testing to my app, but I'ma little bit unclear on the concept. I've looked at Apple's docs on the Sentest framework and had no trouble getting the sample project working, but I lose it when translating the concepts to my particular application. I've seen some sample projects around the net that use the Sentest framework, but the the unit tests are trivially simple, asserting that 1+1 = 2, for example. What I really need is a sample project of some complexity that uses real unit tests against the project. Can anyone help me out here? My app is an NSStatusItem that retrieves data from the internet, and displays it in the NSStatusItem's menu. The only real user interface besides that is the preferences window. Should my unit test manually invoke the IBAction that displays the window and then fill its fields with values I need to test?
TIA
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/scottdensmore%40mac.com

This email sent to scottdensm...@mac.com

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to