首页 > 解决方案 > iOS UITests 通过 Xcode 但因 xcodebuild 失败

问题描述

当我从 XCode 运行我的 UITest 时,它们都正确通过,但是当我使用 xcodebuild 时 - 其中一些失败并出现错误:

Failure: UITestBase.swift:63: Failed to get matching snapshot: Lost connection to the application (pid 43193).

目前我使用的是 11.6,它在 Xcode 10.x 上运行良好,xcodebuild 指向更正 Xcode,其中测试从 IDE 传递

我正在使用的 xcodebuild 命令:

xcodebuild clean test -workspace APP.xcworkspace -scheme APPUITests -configuration Release OTHER_SWIFT_FLAGS="-DCOCOAPODS -DAPPProdTarget" -destination "platform=iOS Simulator,name=iPhone 11,OS=13.6"

标签: iosxcodexcodebuilduitest

解决方案


推荐阅读