Re: C++ TDD in xcode
Re: C++ TDD in xcode
- Subject: Re: C++ TDD in xcode
- From: Drew McCormack <email@hidden>
- Date: Sat, 11 Dec 2004 21:03:03 +0100
On Dec 10, 2004, at 10:57 AM, Thaddaeus Frogley wrote:
Hi,
I'm interested in trying out some Test Driven Development in xcode.
So, for instance, I have a project that has a static library target
(the main product), and I have created a test framework target (static
library) and a test client target (command line tool). The test
client is dependant on both the test-framework, and the static library
that it tests (of course) but I'd quite like to have the test client
built and run as part of the over-all build process (perhaps an
aggregate target?), with it's output fed to the build results window
and have the build fail if the test suite fails.
Is anyone doing something like this already? Can any of you give me
some advice on how to set this up?
I do use TDD, but perhaps not exactly as you would like to. I have a
Test target, but don't have the tests run as part of the build. I just
hit build and run when I want to run the tests.
Basically, I'd like to be able to set u a work flow where tests are
part of the normal build, and failures are treated as build failures.
Maybe you don't actually need to make an aggregate target. Instead,
make the Test program target depend on the library. You could then add
a script build phase to the Test target, that simply runs the test
executable after it has built. When you are developing, do so with the
Test target selected, so that whenever you build, the library is first
updated, then the Test program built, and lastly the script build phase
run.
The only problem with this is that you may not get the output of the
test run where you want it. It would appear in the build window, rather
than the run log. If you wanted the run log, you may be able to add an
applescript build phase instead that simply runs the Test executable
via Xcode, rather than the script phase, which would effectively run
via bash.
Hope this helps.
Drew
---------------------------------------------------------
Drew McCormack
www.maniacalextent.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden