gpt4 book ai didi

ios - Jenkins 和 Xcode5 单元测试目标 - 没有测试输出?

转载 作者:行者123 更新时间:2023-12-02 07:14:33 24 4
gpt4 key购买 nike

我正在将 Jenkins CI 服务器从 XCode 4.6 升级到 XCode 5 和 iOS SDK 7。

要运行单元测试,我现在必须使用 xcodebuild test。我将此命令的输出通过管道传输到 Ruby 脚本,该脚本生成测试报告。

升级后此功能不再有效。我认为问题在于 xcodebuild test 启动了一个新进程来实际运行测试。我日志中的最后一条语句是

/bin/sh -c /Volumes/Data/Jenkins/jobs/MyProject-Unit/workspace/Build/Intermediates/Redacted.build/Debug-iphonesimulator/UnitTests.build/Script-261C7EA912FD9A4B00F7A53E.sh

在 Jenkins 日志中找不到该点之后的输出,但是当我在自己的机器上运行它时,我得到了在控制台中打印的测试结果。

这里发生了什么,我怎样才能取回测试报告?

最佳答案

我也在同一条路上。我相信如果您查看该脚本,它会转身并调用此脚本:

${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests

这是用于运行单元测试的脚本。现在,在 Xcode 5 中,它只是告诉您删除 Xcode 4 自动创建的运行脚本构建阶段。如果您从 Xcode 5 运行 RunUnitTests,它只会显示:

RunUnitTests is obsolete. To run unit tests for your target, use the Test scheme action in the Xcode IDE and the test action in xcodebuild. You can remove the Run Script build phase that invokes RunUnitTests from your unit test bundle target.

我已经按照它所说的做了(删除了运行脚本阶段),但在 Jenkins 下我仍然没有得到任何输出,也许是因为,正如你所猜测的,这是一个新的过程,并且 Jenkins 看到第一个过程完成了,并且跳出来。

更新:更多信息请参见:How can I get Xcode 5 to run iOS unit tests on a Jenkins slave?

关于ios - Jenkins 和 Xcode5 单元测试目标 - 没有测试输出?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18824362/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com