small medium large xlarge

Me_in_antigua_pragsmall
20 Oct 2008, 09:41
Carlton Gibson (7 posts)

Hi there,

I’ve just done a search through the PDF for ‘unit’ looking for a discussion of unit testing – I didn’t find one.

I know this is just an introduction to the neighbourhood but good neighbours unit test! Please, please, please include a discussion of the testing framework we should be using and how to get it set up.

Thanks. Carlton

Daniel_pragsmall
08 Nov 2008, 22:03
Daniel H Steinberg (98 posts)

Carlton,

I’ve been thinking about this for a while. I don’t tend to write Java code without unit testing but I’ve not been happy using OCUnit for writing cocoa code.

BUT – I just edited a new chapter from Brian Marick’s Ruby-Cocoa book where he uses Ruby test frameworks to test Cocoa apps. I may give that a try.

Daniel

Me_in_antigua_pragsmall
10 Nov 2008, 08:48
Carlton Gibson (7 posts)

Hi Daniel,

Thanks for your reply.

I don’t mind if it’s OCUnit or something else… The reason I used it by name is that OCUnit seems to be the bundled option (and using the defaults meshes with your point about using XCode and Cocoa etc as that’s what the community uses).

All that really matters to me is that a testing solution is covered (even if only briefly). I am very happy to take your advice on which testing solution that should be :-)

Regards, Carlton

Daniel_pragsmall
27 Nov 2008, 12:56
Daniel H Steinberg (98 posts)

Does anyone have a favorite solution? I liked where UnitKit was going when it was active. It was (I think necessarily) abandoned when Apple embraced OCUnit instead.

Me_in_antigua_pragsmall
27 Nov 2008, 15:35
Carlton Gibson (7 posts)

Hi Daniel,

Here’s a couple links which came up on the Cocao Dev mailing list (since Oct 20th). They both focus on OCUnit and no other solution has been mentioned. (This obviously doesn’t help with an alternative solution but I hope it’s useful anyway…)

http://developer.apple.com/documentation/DeveloperTools/Conceptual/UnitTesting/UnitTesting.html

http://cocoaheads.byu.edu/sites/default/files/meetings/2008-11-13-Unit-Testing-slides.pdf

Daniel_pragsmall
28 Nov 2008, 13:31
Daniel H Steinberg (98 posts)

Thanks Carlton,

I saw the ADC article and assumed that it meant a recommitment to OCUnit. I’d also love to see someone do/finish the Cocoa port of Fit.

Generic-user-small
24 Jan 2009, 14:55
stuart robertson (5 posts)

Hi Daniel. I just bought your pdf and am poring over it. How nicely scoped and done!

I’d also be very interested in a section on testing recommendations. Even if you’re not terribly happy with the framework, your thoughts would be valuable.

Regards,

Stu

Yeslekmc_2_pragsmall
02 Feb 2009, 18:49
Kelsey McClanahan (10 posts)

I’m also interested in seeing a write-up on Cocoa development and unit testing. However; I don’t think this book is a good place for it. I’d like to see a book that specifically covers the following topics using Xcode:

1) Setting up and utilizing version control (Subversion) 2) Unit testing 3) Creating a nightly build process (automated, to run at a certain time every day, and report errors back to appropriate administrators) 4) Ensure that an application can be built from a clean machine, from the repository 5) Best practices for localization of Mac OS X apps 6) Testing automation 7) Demonstrate how take a version control backup, and be able to regenerate an app from scratch (covers the worse case scenario of losing your dev shop and all computers contained there in)

These topics have been covered in bits and pieces, but I’m not aware of a concise resource or guide that covers all of these topics in a manner that is easy to understand and quick to adopt.

Thanks, —> Kelsey

Daniel_pragsmall
24 Feb 2009, 22:34
Daniel H Steinberg (98 posts)

Thanks Kelsey.

Just thinking outloud … except for 2 and 5 these aren’t Mac specific topics. Some of these are nicely covered by Mike Clarke’s book on automation or the bookshelf’s Svn title. We are looking at other books in the Mac space though so we will keep that list handy. Also maybe a screencast on one or more of these …

Me_in_antigua_pragsmall
26 Feb 2009, 13:10
Carlton Gibson (7 posts)

bq. I’m also interested in seeing a write-up on Cocoa development and unit testing. However; I don’t think this book is a good place for it.

Just to clarify the request, it’s not for a complete unit testing reference, more for a “oh and here’s the unit testing facilities” – the book is an intro to the neighbourhood and OCUnit (or whatever) is part of that.

Perhaps a quick appendix with the basics plus links to more is all that is required.

Daniel_pragsmall
26 Feb 2009, 14:22
Daniel H Steinberg (98 posts)

Yeah – I also started playing with Clang. WOW. Not unit testing but it’s nice to have a static analyzer that can spot leaks.

Before you all start applying it to my sample code … I’m going to run it against everything and fix any non-deliberate ommissions for the next beta.

D

Yeslekmc_2_pragsmall
28 Feb 2009, 06:29
Kelsey McClanahan (10 posts)

bq. Just thinking outloud … except for 2 and 5 these aren’t Mac specific topics.

These topics are covered elsewhere, but not always clear and straight forward on how to implement it for the Mac (Cocoa) specific. Try searching for some of the topics via the web – you’ll find the web is littered with sporadic out of date examples for applying these topics to the Mac. I’ll pay good money for a book that covers these subjects with articulate Mac specific examples.

Thanks for keeping it in mind for future titles. —> Kelsey

Daniel_pragsmall
27 Mar 2009, 01:01
Daniel H Steinberg (98 posts)

We may be adding something to the book where this would make sense – I’ll let you guys know.

Me_in_antigua_pragsmall
01 Apr 2009, 08:10
Carlton Gibson (7 posts)

Here’s a good post on the Red Sweater Blog that might be handy:

http://www.red-sweater.com/blog/779/fast-unit-testing-iterations

You must be logged in to comment