2014-09-30 37 views
1

我已將Jenkins集成iOS項目。要運行自動化測試用例,我在shell腳本中使用下面的代碼。無法爲Calabash + Jenkins自動檢測APP_BUNDLE_PATH

export DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer/ 
export CODESIGN_ALLOCATE=`xcode-select -print-path`/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate 


xcodebuild -alltargets clean 
xcodebuild -alltargets 
xcodebuild -sdk iphonesimulator \ 
      -project Myapp.xcodeProj \ 
      -scheme Myapp-cal \ 
      ONLY_ACTIVE_ARCH=NO \ 
      CONFIGURATION_BUILD_DIR="$WORKSPACE/build" \ 
      clean build 
cucumber 

自動化測試在xcode中正常工作,正如Jenkins得到下面的錯誤一樣。

無法自動檢測APP_BUNDLE_PATH。您是否爲 模擬器構建了您的應用程序?搜索目錄: /Users/test/Library/Developer/Xcode/DerivedData/Myapp-fayplezntrxmdqeteknsfkkvtzla/Build/Products 請從Xcode構建您的應用程序您應該構建-cal目標。

幫助表示讚賞

回答

4

我相信所有你需要做的是導出APP_BUNDLE_PATH在腳本中調用之前黃瓜。

事情是這樣的:

export APP_BUNDLE_PATH="${WORKSPACE}/build/Build/Products/Debug-iphonesimulator/Myapp-cal.app" 
cucumber 

要看到在野外一個這樣的例子看到石楠木-IOS-例如回購。 [1]

FYI/BTW APPAPP_BUNDLE_PATH是可以互換的。 [2]

+0

我跟着鏈接1中提到的步驟,現在是工作的罰款。謝謝.. – Raghav 2014-10-01 06:10:40

0

刪除的/Library/Developer/Xcode/DerivedData內容並重新編譯解決了這個問題對我來說。我不想硬編碼APP_BUNDLE_PATH,因爲我有多個目標。

我的錯誤信息是Unable to auto detect APP_BUNDLE_PATH.