Outdated: See Continuous Integration for Cocoa Reloaded
Some time ago, I wrote about how to use Jenkins for Cocoa/iPhone projects. Back then, I used GHUnit which can produce JUnit test results XML files. Recently, I found OCUnit2JUnit which converts OCUnit results to JUnit result XML format. Thus, no more GHUnit. Do the following
xcodebuild -target NAME_OF_TARGET -configuration Debug clean test | /PATH/TO/ocunit2junit.rb
xcodebuild -scheme NAME_OF_SCHEME -configuration Debug clean test | /PATH/TO/ocunit2junit.rb
Note that you may have to copy the scheme definitions before executing
xcodebuild, see the post How to Use Subprojects with Xcode and Jenkins.
Add “Publish JUnit test result report” step as a post-build action with
**/test-reports/*.xml and you’re set!