如何在记录测试结果时解决Jenkins构建错误?

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

记录测试结果</ p>


“错误:发布者hudson.tasks.junit.JUnitResultArchiver因异常而中止
hudson.AbortException:未找到测试报告文件。配置错误 ?“</ p>
</ blockquote>

我试图在Jenkins文档和堆栈溢出中搜索答案,但是我没有找到任何答案。</ p>
< / DIV>

展开原文

原文

After all the successful steps of my Jenkins build I get an error:

Recording test results

"ERROR: Publisher hudson.tasks.junit.JUnitResultArchiver aborted due to exception hudson.AbortException: No test report files were found. Configuration error?"

I tried to search the answer in Jenkins documentation and on stack-overflow, however I didn't find any answer.

dongyunshan4066
dongyunshan4066 检查测试报告文件路径。
大约 5 年之前 回复

2个回答



如果您使用behat3,请确保其版本具有junit formatter支持,因为在早期版本中错过了 https://github.com/Behat/Behat/pull/676 </ p>

< p>还要检查你是否在behat.yml配置了配置文件</ p>

behat 2 </ p>

  jenkins:
formatter:
name: pretty,junit
参数:
output_path :, build / logs / behat
</ code> </ pre>

behat 3 </ p>

   jenkins:
格式化程序:
ju​​nit:[build / log / behat]
</ code> </ pre>

此外,build.xml必须将其称为“behat --profile jenkins”< / p>
</ div>

展开原文

原文

If you use behat3, then make sure that its version has junit formatter support, as it was missed in early versions https://github.com/Behat/Behat/pull/676

Also check that you have configured profile at behat.yml

behat 2

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

behat 3

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

Also build.xml must call it as "behat --profile jenkins"



我可能认为您已将测试结果路径配置为与Jenkins工作区无关(通常,这是您运行的目录) 测试来自)。 应该根据Jenkins工作空间目录配置JUnit结果xml路径,该目录是xml报告的根目录。
</ p>
</ div>

展开原文

原文

I may assume that you have configured your test result path not to be related to Jenkins workspace (usually, this is the directory which you run tests from). JUnit result xml path should be configured in relation with Jenkins workspace directory, which is the root directory for you xml reports. your report in workspace

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问