• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: OCUnit vs OBJCUnit
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OCUnit vs OBJCUnit


  • Subject: Re: OCUnit vs OBJCUnit
  • From: James Quick <email@hidden>
  • Date: Wed, 25 Jun 2003 19:36:19 -0400

On Wednesday, June 25, 2003, at 06:42 PM, Jiva DeVoe wrote:

Both frameworks deliver that level of integration. Specifically however I was referring to how I always disliked that OCUnit required an external script to run the test application. Or a least it did when I used it. There are some good reasons to do this, in particular when writing test frameworks for things like C++, which doesn't have reflection capabilities.

Hmmm. I had not looked deeply enough into where/when AllTests was called.
I see now where TestRunnerMain([AllTests class]);
is called in the main function for OBJCUnit.

I actually don't see this problem.

By default OCUnit runs an external utility, otest, which probes the bundle/excecutable/framework
for all the testing code, then runs all the tests. Looking at the code, I see a function
SenSelfTestMain(), whose comment says you can call from your main function.
There all also some methods in SenTestProbe
+ (BOOL) isLoadedFromApplication
and
+ (BOOL) isLoadedFromTool
So it would appear that you can embed your tests internally and omit the external otool run.


What I do like is the way both otest and SenSelfTestMain(), rely on name and signature
to identify and gather tests automatically. It seems like a pain to have to manually add
all of your tests to Alltests.m each time you add a new suite of tests. OCUnit simply
walks through the classes and methods to find every relevant test.

You can through arguments, defaults, and Build variables tell it to find and run only a subset
of tests if you like.
_______________________________________________
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.
References: 
 >Re: OCUnit vs OBJCUnit (From: Jiva DeVoe <email@hidden>)

  • Prev by Date: Re: OCUnit vs OBJCUnit
  • Next by Date: Re: OCUnit vs OBJCUnit
  • Previous by thread: Re: OCUnit vs OBJCUnit
  • Next by thread: Re: OCUnit vs OBJCUnit
  • Index(es):
    • Date
    • Thread