Re: Unit testing and Xcode integration
Re: Unit testing and Xcode integration
- Subject: Re: Unit testing and Xcode integration
- From: Joseph Heck <email@hidden>
- Date: Sun, 13 Aug 2006 23:15:54 -0700
Christian,
I have a copy of the UnitKit project, as I'm sure JDD (the author
email@hidden) does as well. I have revision 136 from the svn
repository - I think it was the last. I have made it available as a
ZIP archive (minus the .svn directories) at http://www.rhonabwy.com/
unitkit.zip.
The license is Apache 2.0, so there's no reason you couldn't re-host
it somewhere and do with it as you like.
-joe
(one-time UnitKit contributor)
On Aug 13, 2006, at 10:46 PM, Christian Moen wrote:
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
_______________________________________________
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