Issue running OCUnit tests.

We've added unit tests to our project, (awesome learning curve, not!), and have a problem running the tests in AppCode: (Tests run fine in XCode.)

I get the following message when attempting to run the tests:

The test bundle at /Users/seamusmcgowan/Projects/Cigna/iOS/myCigna/build/Debug-iphonesimulator/Cigna Tests.octest could not be loaded because a link error occurred.  It is likely that dyld cannot locate a framework framework or library that the the test bundle was linked against, possibly because the framework or library had an incorrect install path at link time.

Any suggestions to get around the issue? I'm not really confident in XCode's test runner, it has passed two tests it should have failed, AppCode properly fails the tests.

BTW if anyone wants to know why XCode's unit test support is so poor, the executive of our iOS group went to WWWDC and talked to the single dev dedicated, part-time, to the unit test feature. Apple doesn't even use it. The one team he talked to that does heavy unit testing is the CoreData team and they use an old version of the sensa kit.

Any suggestions for information on other test frameworks would be appreciated, we're evaluating GHUnit and any pointers to information on unit testing objective-c projects would be welcomed.

3 comments
Comment actions Permalink

Seamus,

it is hard to tell what the problem is without the exmaple. Can you maybe try to isolate it and send the sample project to us?
BTW, not sure if I get it correctly, does Xcode run this test bundle or does it fail with such message?

You also may be interested in watching http://youtrack.jetbrains.com/issue/OC-2408, we plan to improve support for third-party unit test frameworks soon.

0
Comment actions Permalink

Sorry about the lack of clarity, my frustration with XCode's unit test support was coming through.

The test bundle runs in XCode. However, It's passing a test that includes a method call that hasn't been implemented yet. The method is declared in the header, just not implemented. So our confidence in XCode's unit test support is not very high.

At one time I was able to run the test bundle in AppCode and it correctly saw the exception for calling an unknown method and properly failed the test.

Subsequently, AppCode cannot run the test bundle, displaying the above listed error message.

I'll try to reproduce the problem in another project. Our project is huge and we added the unit test target after creating the project, not when we created the project. I believe this is the source of the problem, it took us several iterations simply to get the unit test target working at all in XCode.

Coming from .Net where we just add a test project to the solution and it just works, this is pretty annoying and unreliable.

0
Comment actions Permalink

Glad to see you are adding support for third party unit test frameworks. Not sure how good the other frameworks are, but this could be an opportunity for JetBrains to implement your own.

0

Please sign in to leave a comment.