[英]How do you configure the XCode Jenkins plugin to run tests?
使用Jenkins XCode插件運行測試的說明是設置測試目標(我已經完成),SDK(我已經完成)和配置(我沒有嘗試,調試和測試)。
但是我一直在“......沒有配置運行”。
我如何讓它運行測試?
這是輸出:
+ xcodebuild -workspace /Users/MyDir/.Jenkins/jobs/MyTests/workspace/folder/MyWorkspace.xcworkspace -scheme MyTestScheme clean
xcodebuild: error: Failed to build workspace MyWorkspace with scheme MyTestScheme.
Reason: Scheme "MyTestScheme" is not configured for running.
如果在XCode for MyTestScheme中如果我選擇Product / Run然后我得到相同的錯誤消息,但如果我選擇Product / Test,那么測試代碼會成功執行。 Xcode中成功運行的輸出是:
2013-08-28 11:10:25.828 otest[65917:303] Unknown Device Type. Using UIUserInterfaceIdiomPhone based on screen size
Test Suite 'Multiple Selected Tests' started at 2013-08-28 18:10:26 +0000
Test Suite '/Users/MyDir/Library/Developer/Xcode/DerivedData/MyWorkspace-ctngidolzdhijvbymvghygtoaiiw/Build/Products/Debug-iphonesimulator/MyTestScheme.octest(Tests)' started at 2013-08-28 18:10:26 +0000
Test Suite 'MyTests' started at 2013-08-28 18:10:26 +0000
Test Case '-[MyTests test1]' started.
2013-08-28 11:10:26.029 otest[65917:303] MDN: (null)
Test Case '-[MyTests testA1]' passed (0.346 seconds).
對我來說問題是使用測試模式。 應該使用調試模式。
XCode插件維護者在這里。 我不知道答案,但我很樂意幫助你。
您是否嘗試過擺弄目標參數?
Eg -destination 'OS=8.0,name=iPhone'
或-destination 'platform=iOS Simulator,OS=8.0,name=iPhone 6s'
(根據您的需要調整)
如果這不起作用,請嘗試從XCode本身復制測試運行生成的輸出。
要為單元測試配置Xcode插件,您需要在“高級Xcode構建選項”中的“自定義xcodebuild參數”字段中編寫“test”。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.