Outdated: See Continuous Integration for Cocoa Reloaded
I am using AppCode for not-so-daily Cocoa coding sessions. Therefore, I want to use its nice OCUnit integration—similar to the JUnit integration of IntelliJ. At the same time, I do not want to give up the CI integration of GHUnit. To combine both, I did the following.
- Set up your GHUnit target denoted by
- Create a new OCUnit target denoted by
- Let test classes inherit from
- At this stage, the
ocunitcan be run using Product->Test in XCode or by setting and running a new OCUnit Run Configuration in AppCode.
- If you try to run
ghunit, it will fail saying that the SenTestingKit framework is not loaded. You have to set the environment variable
/Developer/Library/Framework: conversation in the xcode-users mailng list. To do this, create the following property file in
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>DYLD_FALLBACK_FRAMEWORK_PATH</key> <string>/Library/Frameworks:/Network/Library/Frameworks:/System/Library/Frameworks:/Developer/Library/Frameworks</string> </dict> </plist>
- Write some tests.
- That’s it!