Re: OCUnit vs OBJCUnit
Re: OCUnit vs OBJCUnit
- Subject: Re: OCUnit vs OBJCUnit
- From: Marco Scheurer <email@hidden>
- Date: Wed, 25 Jun 2003 21:51:00 +0200
On Wednesday, June 25, 2003, at 06:50 PM, James Quick wrote:
I have recently decided to try out test driven development.
For objective C testing frameworks I found two projects:
OBJCUnit - http://oops.se/objcunit/
and OCUnit - http://www.sente.ch/software/ocunit/
I have read the limited documentation available for each,
and have read the papers and documentation for Junit
from which they both descend.
In fact, OCUnit descends from SUnit, the original Smalltalk framework
by Kent Beck, and was approximately written at the same time as JUnit.
This is why, for instance, OCUnit test macros are named should and not
assert.
I have read the examples and about 25% of the code for each.
It seems that they each have a different intended style of integration
with Project Builder. OBJCunit wants to be used by defining an
additional target in PB, requiring that all your own classes to be
tested be added to that target as well as the primary. The benefit
seems to be that you can produce your real target free from any
testing code. OCUnit, provides hooks to test Objects in the interface,
and also provides hooks for testing frameworks and bundles.
The last release of OBJCUnit was v 1.2 in March of 2002. OCUnit,
has been modified every few months up until recently, but still
contains a number of components which need work or are still
using PB.proj WOProject files.
Since OCUnit still supports WebObjects 4.5 (Objective C), OPENSTEP, and
now GNUSTEP, you can of course find files targeted for these
environments. As far as I know, nothing is missing to use OCUnit with
Cocoa.
They both could use some work with documentation and commenting
to make them more accessable.
Documentation: did you read the tutorial on Stepwise (also found in the
distribution as OCUnitWWDC2002.rtfd)? IMHO there's not much else to
add: writing tests is really straightforward. The theory itself is
well covered in many places and books. The integration in the
environment and the workflow is described in
TestingFromOSXProjectBuilder.html.
Of course we will look into XCode integration as soon as possible.
Currently, based both on what appears to be a simpler workflow, and
more active modification, I am leaning towards OBJCUnit. My knowledge
is quite sparse on the subject, however, and any input or advice from
someone with more experience would be very welcome as I make
a decision.
Before I invest more time in learning about them, I would like to know
if anyone on this list is actively using either of the tools as part
of their
regular workfow?
Which would you recommend?
I'll let others comment on this.
Marco Scheurer
Sen:te, Lausanne, Switzerland
http://www.sente.ch
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.