August 27, 2012
Continuous Integration for Cocoa using Jenkins, Part II

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

or

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!

Blog comments powered by Disqus