拖了好久的稿,離我們完成架設基本的 iOS CI 只剩最後一步啦
上一回,我們成功了利用 xcodebuild 跑完了測試,也看到結果。
不過,這個結果人看的懂, Jenkins 看不懂。
利用 google 大神,發現有人寫好了一個 ruby script,可以 parse OCUnit 的結果並產生 junit 的報表。
OCUnit2JUnit
照著裡面的說明,把相關檔案放好,執行
上一回,我們成功了利用 xcodebuild 跑完了測試,也看到結果。
不過,這個結果人看的懂, Jenkins 看不懂。
利用 google 大神,發現有人寫好了一個 ruby script,可以 parse OCUnit 的結果並產生 junit 的報表。
OCUnit2JUnit
照著裡面的說明,把相關檔案放好,執行
1
2
|
xcodebuild -configuration Debug -sdk iphonesimulator \
-target Project1Tests SL_RUN_UNIT_TESTS=YES 2>&1 | .
/ocunit2junit
|
就會看到一個目錄 test-reports/ ,裡面就放著精美的 junit format reports
From:http://kf013099.blogspot.com/2013/02/ocunit-jenkins-junit.html