Unable to run tests with Appcode 1.5.2 and Xcode 4.4 (OS X Mountain Lion)

When I run the tests for the attached project with AppCode 1.5.2 on Mountain Lion with Xcode 4.4, I get this error: Unable to attach test reporter to test framework or test framework quit unexpectedly

I can run the tests:

  • Directly through Xcode 4.4 on my Mountain Lion computer.
  • Using the "xcodebuild" command line from AppCode log, by switching TEST_AFTER_BUILD from NO to YES.
  • Through AppCode 1.5.2 and Xcode 4.3.2 on my Lion computer.

Is this a bug, or am I doing something wrong in my project?

Comment actions Permalink

we are aware of this problem and have already fixed it (assuming you have a problem with iOS 'logic' tests). The fix will be officially available in the next bugfix update.

To workaround the problem you can either run tests as an injected bundle, specifying TEST_HOST and BUNDLE_LOADER in the build settings; or setting CFFIXED_USER_HOME environment variable in the Run Configuration's dialog to '/Users/<username>/Library/Application Support/iPhone Simulator/<sdk version>' (e.g. '/Users/sam/Library/Application Support/iPhone Simulator/5.1').

Anton Makeev

Comment actions Permalink

Thanks, Anton. The CFFIXED_USER_HOME option got me up and running again.

BTW, I was able to use $USER_HOME$ instead of /Users/Dale there, so the path isn't hardcoded to me.

Comment actions Permalink

I moved to Mountain Lion and I'm having the same problem with the latest EAP build (AppCode-121.35).

I tried setting the CFFIXED_USER_HOME env var but it didn't work.
Any ideas?

Comment actions Permalink

OK, As a workaround I found out that running the regular app target before running the tests solves the problem.
I wonder if it's a problem in my project's settings or in AppCode (Xcode is able to run the tests...)

Comment actions Permalink

Yoni, you don't need to specify CFFIXED_USER_HOME in AppCode 1.6 EAP as it only may harm.
What problem expactly do you have? What is the console output? Does the problem arise in both Run and Debug mode?

Could you please create a sample project that shows the problem?

Comment actions Permalink

The error is a missing library (the Sparrow framework):
"no such file or directory: '/Users/<username>/Library/Caches/appCode10/DerivedData/<my_app>/Build/Products/Debug-iphonesimulator/libSparrow.a'"

I actually managed to solve this by changing my project's build settings, so it may not be AppCode's problem afterall.
It's just that in Xcode the problem doesn't happen (maybe Xcode builds the app even if I'm only running unit tests).
thanks anyhow...


Please sign in to leave a comment.