【问题标题】:Unable to auto detect APP_BUNDLE_PATH for Calabash + Jenkins无法自动检测 Calabash + Jenkins 的 APP_BUNDLE_PATH
【发布时间】:2014-09-30 09:57:24
【问题描述】:

我已将 iOS 项目与 Jenkins 集成。为了运行自动化测试用例,我在 shell 脚本中使用以下代码。

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 目标。

帮助赞赏

【问题讨论】:

    标签: jenkins calabash-ios


    【解决方案1】:

    我相信您需要做的就是在调用 cucumber 之前在脚本中导出您的 APP_BUNDLE_PATH

    类似这样的:

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

    要在野外查看此示例,请参阅 briar-ios-example 存储库。 [1]

    仅供参考/顺便说一句 APPAPP_BUNDLE_PATH 可以互换。 [2]

    【讨论】:

    • 我按照链接 1 中提到的步骤操作,现在工作正常。谢谢你..
    【解决方案2】:

    删除/Library/Developer/Xcode/DerivedData 的内容并再次编译为我解决了这个问题。我不想硬编码APP_BUNDLE_PATH,因为我有多个目标。

    我的错误信息是Unable to auto detect APP_BUNDLE_PATH.

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-01-21
      • 2020-10-07
      • 2016-06-14
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多