Re: Re: Unit testing and Xcode integration
Re: Re: Unit testing and Xcode integration
- Subject: Re: Re: Unit testing and Xcode integration
- From: "Christian Moen" <email@hidden>
- Date: Mon, 14 Aug 2006 14:46:21 +0900
Hello Chris,
Thanks for your commens and tips -- I understand where you're coming from.
The reason I brought this is up that UnitKit doesn't seem to be
available any more; the site is gone, I can't find the distribution
anywhere the and all development has been discontinued. As far as I
understand, UnitKit won't be available at all any longer.
It's great that unit testing is getting supported directly by Xcode,
but I was more happy with UnitKit than what Xcode has to offer today.
I want to use "standard stuff" so I'll continue using OCUnit and look
into how I can integrate the test runs with Growl using your advice.
Thanks again.
Christian
On 8/14/06, Chris Hanson <email@hidden> wrote:
On Aug 13, 2006, at 6:32 PM, Christian Moen wrote:
> On 8/14/06, Chris Hanson <email@hidden> wrote:
>> On Aug 13, 2006, at 8:13 AM, Christian Moen wrote:
>> > Is there a way to integrate the OCUnit test runs more tightly into
>> > Xcode?
>>
>> It's not clear what you mean by "more tightly"? What specific
>> capabilities are you looking for?
>
> I'm looking for a tool which allows me to see the results of my unit
> test runs in a more accessible place than in the verbose Build Results
> window. To me this is hard to read, but perhaps it's just old habit.
> Is this what most people use?
This is the default behavior. The hooks exist for customizing it, by
observing the appropriate notifications from within your test bundle,
or by observing the appropriate distributed notifications from any
application. Of course, the most important indicator is the one that
says "Build Succeeded" which -- in the case of a unit test bundle --
also indicates that all tests ran successfully.
You still haven't articulated what "more accessible" might mean in
regards to your unit test results.
> See http://testkit.sourceforge.net/user/tools.html for TestKit's GUI
> or terminal based test runners. (TestKit is a third Objective C unit
> test framework.)
You probably don't really want to simply load your test bundle into a
"test runner" interface and press a button to run your tests. After
all, you can't unload them and re-load them when you change your
code. Instead, what you probably want is to either invoke /Developer/
Tools/otest or /Developer/Tools/RunUnitTests whether from the command
line or from any graphical tool that you may build.
> I'm new to SenTestingKit, but to me it's a mystery why this ended up
> in Xcode instead of UnitKit. :)
OCUnit is one of the most mature unit testing frameworks available,
as it is a direct descendent of the original Smalltalk SUnit.
One difference that I do remember between OCUnit and UnitKit is that
UnitKit used -init and -dealloc for not just memory management but
also as an equivalent to -setUp and -tearDown. OCUnit (like SUnit
and JUnit) explicitly avoids this, because test fixture creation and
destruction needs to happen at deterministic points, whereas test
case memory management is really not deterministic.
That said, if you want to use UnitKit with Xcode, go right ahead;
nothing's preventing you, except perhaps the fact that unitkit.org
appears to be down at the moment. The Xcode unit testing
infrastructure also has support for invoking a test rig other than
those for OCUnit and CPlusTest. Simply specify the path to an
executable as the TEST_HOST for your project, and it will be invoked
to run your unit test bundle with the path to your unit test bundle
as its sole argument.
-- Chris
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden