Re: Unit testing question
Re: Unit testing question
- Subject: Re: Unit testing question
- From: Scott Densmore <email@hidden>
- Date: Sat, 25 Jul 2009 14:29:30 -0400
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/email@hidden/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, email@hidden 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 (email@hidden)
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:
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden