xcode - 当单元测试失败时,构建不会被标记为不稳定

标签 xcode hudson

我在我的 Hudson 服务器中添加了一个新作业,它使用 makefile 构建项目。

执行shell命令:

#!/bin/bash
cd $JOB_NAME
make

我的 makefile 看起来像这样

SDK_31 = iphonesimulator3.1
TARGET_DEV = myProject
TARGET_TEST = unitTest

all: debug
debug:
        xcodebuild -sdk ${SDK_31} -target "${TARGET_DEV}" -configuration Debug
        xcodebuild -sdk ${SDK_31} -target "${TARGET_TEST}" -configuration Debug

clean:
        xcodebuild -alltargets clean
        rm -rf build

但是当 Hudson 构建项目时,一些单元测试失败,但构建被标记为成功。

我应该怎么做才能拥有一个“不稳定的项目”?

最诚挚的问候,

最佳答案

您应该通过启用“发布 Junit 测试结果报告”构建后操作来配置 Hudson 来记录单元测试结果。

post-build actions http://img141.imageshack.us/img141/5136/hudsonjunit.png


更新:如果您无法获取 JUnit XML 输出,您应该能够使用 Text-finder plugin更改构建状态:

This plugin lets you search keywords in the files you specified and use that to mark the build as success or a failure.

关于xcode - 当单元测试失败时,构建不会被标记为不稳定,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1431777/

相关文章:

jenkins - 持续集成游戏(ci-game)如何在具有多个提交者的Hudson/Jenkins中插入

xcode - 使用参数初始化自定义 UITableViewCell

iOS - 确保在主线程上执行

ios - 如何使用 xcode 为其他证书/商店帐户构建 ios 应用程序

ios - 恢复 App 时获取 launchOptions

Java Profiler 报告 Hudson

hudson - 即使在 Jenkins 上构建失败,如何运行 Sonar 分析

visual-studio-2010 - Visual Studio 网站构建在 CI 服务器上间歇性失败

hudson - 在Hudson CI中为CUnit配置xUnit

ios - 使用 ShareExtension 分发 Flutter 应用程序时缺少 CFBundleShortVersionString