【问题标题】:How to solve Jenkins build error on recording test results?如何解决 Jenkins 在记录测试结果时构建错误?
【发布时间】:2015-04-27 12:21:49
【问题描述】:

在我的 Jenkins 构建的所有成功步骤之后,我收到一个错误:

记录测试结果

“错误:发布者 hudson.tasks.junit.JUnitResultArchiver 由于异常而中止 hudson.AbortException:未找到测试报告文件。配置错误?”

我尝试在 Jenkins 文档和堆栈溢出中搜索答案,但没有找到任何答案。

【问题讨论】:

  • 检查测试报告文件路径。

标签: java php testing jenkins continuous-integration


【解决方案1】:

如果您使用 behat3,请确保其版本支持 junit 格式化程序,因为早期版本中缺少它https://github.com/Behat/Behat/pull/676

还要检查您是否已在 behat.yml 配置配置文件

行为 2

jenkins:  
    formatter:
        name: pretty,junit
        parameters:
            output_path: ,build/logs/behat

行为 3

jenkins:
    formatters:
        junit: [build/log/behat]

build.xml 还必须将其称为“behat --profile jenkins”

【讨论】:

    【解决方案2】:

    我可能假设您已将测试结果路径配置为与 Jenkins 工作区无关(通常,这是您运行测试的目录)。 JUnit 结果 xml 路径应与 Jenkins 工作区目录相关配置,该目录是您 xml 报告的根目录。

    【讨论】:

      猜你喜欢
      • 2015-09-03
      • 2019-03-26
      • 1970-01-01
      • 1970-01-01
      • 2021-08-20
      • 2017-05-04
      • 2019-08-27
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多