2012-06-13 79 views
2

我使用JENKINS的WAXSIM在成功的每晚構建之後創建自動測試。在構建運行時,我會看到實際運行Jenkins的遠程系統和WAXSIM代碼,以驗證模擬器是否已啓動,然後將應用程序安裝到模擬器中。問題是,在模擬器上安裝應用程序後,應用程序在激活後立即立即崩潰。該圖標保留在模擬器上。我確認,通過在Jenkins/WAXSIM遠程系統上啓動XCODE並在模擬器上安裝(通過xcode BUILD/RUN)Testable.xcodeproj。它啓動並運行得很好。同名。我使用Jenkins和XCODE插件實際構建和鏈接代碼,然後執行「Execute Shell」步驟,實際檢查並殺死模擬器以及運行waxsim。當我在桌面和遠程系統上使用XCODE中的測試目標構建/運行時,所有測試都能成功運行。WAXSIM使用Jenkins和xcodebuild進行自動化測試和構建

此外,消息「會話無法啓動,模擬器超時。」在大約15-30秒後出現。

下面是從詹金斯的最後幾行建/測試結果:

test of Testable_(Integration_Tests)-Debug-1.0-dSYM.zip OK 
[common_checkout] $ /bin/sh /var/folders/_w/4rf6zzws23j75lvcbgsnc_fm0000gx/T/hudson5038947848545058317.sh 
About to build GUI tests scheme 
About to run waxsim - a long delay here might suggest something is obstructing the view of the simulator on build slave 
Testing finished 
======== PRINT temp file to STDOUT ======== 

Launching '/Users/jenkins/.jenkins/common_checkout/ios/sandbox/dwallace/testable/trunk/testable/documentation/examples/testable/build/release-iphoneos/Testable (Integration Tests).app' on'Simulator - iOS 5.1' 
Session failed to start. Simulator session timed out. 

======== End PRINT temp file to STDOUT ==== 
=========================================== 
GUI Tests failed 
=========================================== 
Build step 'Execute shell' marked build as failure 
+0

你如何運行詹金斯?作爲啓動守護進程?詹金斯是否需要訪問GUI會話來運行GUI測試?它有這樣的訪問權限嗎?如果你做了一個簡單的工作,運行「screencapture test.png」,它工作嗎? – sti

回答

0

我通過刪除所有來自應用程序的目標名稱空間以及項目解決了這個問題。然後它運行沒有問題。

+0

你確定這是個問題嗎?順便說一句,如果你將自己的答案標記爲答案,你會得到XP –

相關問題