“聚集下游测试结果”的问题在哈德森 [英] Problems with "Aggregate downstream test results" in Hudson

查看:316
本文介绍了“聚集下游测试结果”的问题在哈德森的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的Hudson项目似乎没有正确地聚合下游测试结果,我想知道我是否错过了一个配置步骤。我有两个项目,Foo和Foo-Tests,这两个都是自由工作。



在项目Foo我有以下配置:




  • 选中了聚合下游测试结果。

  • 选中上一个选项下的自动聚合所有下游测试
  • 选中构建其他项目并指定Foo-Tests构建。



测试我有以下配置:




  • 选中发布JUnit测试结果报告并指定了我的JUnit报告XML文件。



当Foo构建时,它构建成功并正确触发Foo-Tests构建。 Foo-Tests构建成功,并正确地发布JUnit报告。但是,当我在Foo中查找聚合测试结果时,会有一个最新测试结果(无测试)链接发送给404。



下面是我试过的不能解决问题:




  • 告诉Foo发布JUnit测试结果报告在项目Foo中没有测试,只是Foo-Tests)。

  • 通过Foo-Tests来指纹化所有发布的工件,没有参数(我想知道如果哈德森处理了JUnit报告为幕后的工件)。这会导致错误,因为我没有明确定义要发布的工件。



我使用的是Hudson 1.266。

编辑:
我应该注意,我在Hudson用户邮件列表中发现了两个没有答案的问题,可能有助于解决这个问题:




解决方案

我能够复制你的问题与Hudson 1.266。这是一个Hudson错误,在以后的版本(1.287之前)修复,所以要么升级Hudson或使用这个两次点击解决方法:从项目页面,先到最新Build,然后聚合测试结果。

问题是,Foo的项目页面只显示最新测试结果链接,该链接的URL为 http:// localhost:8080 / hudson-1.266 / job / Foo / lastBuild / testReport / 。因为Foo没有自己的测试,所以此链接没有要引用的JUnit XML文件,并返回您提到的错误。这是固定的在1.266和1.287之间通过重定向从latestBuild / testReport /备份到latestBuild /时没有测试。你在1.266中的替代方法是,而不是点击项目页面中的最新测试结果,向下滚动一下,并点击最新Build在固定链接下。这将带你到latestBuild / URL,并从那里你可以点击聚合测试结果,它有一个URL如 http:// localhost:8080 / hudson-1.266 / job / Foo / lastBuild / aggregatedTestReport / 。在此页面上,您可以在下钻部分查看所有来自下游项目的测试结果。



不幸的是,Drill Down链接仍然有问题,即使在1.287。从Foo,当你向下钻取到Foo-Tests如上所述,你会被带到一个格式错误的URL,它看起来像 http:// localhost:8080 / hudson-1.287job / Foo-Tests / 。您必须手动修改该网址,以在hudson上下文和其后的作业路径之间插入/,以使其看起来像 http :// localhost:8080 / hudson-1.287 / job / Foo-Tests /。然后你将能够实际看到下游的测试结果。



我没有机会通过Hudson源查找错误,但是已经有一个问题。它的问题1574 ,它已经开放近一年



在旁注中,我真的很喜欢Hudson的CI,但他们的界面不是那么光滑。我期待他们在ExtJS中对UI的返工。也许这是他们花费他们所有的时间。


My Hudson projects don't seem to properly aggregate downstream test results and I'm wondering if I've missed a configuration step somewhere. I have two projects, Foo and Foo-Tests, both of which are freestyle jobs.

On project Foo I have the following configuration:

  • Checked "Aggregate downstream test results".
  • Checked "Automatically aggregate all downstream tests" under the previous option.
  • Checked "Build other projects" and specified "Foo-Tests" to build.

On project Foo-Tests I have the following configuration:

  • Checked "Publish JUnit test result report" and specified my JUnit report XML files.

When Foo builds, it builds successfully and correctly triggers a Foo-Tests build. The Foo-Tests build is successful and publishes the JUnit reports correctly. However, when I look for the aggregated test results in Foo, there's a "Latest Test Result (no tests)" link for the build which sends me to a 404.

Here's what I've tried that doesn't solve the problem:

  • Tell Foo to "Publish JUnit test result report" with no parameters (there are no tests in project Foo, just Foo-Tests). This caused an error since there were no test files for it to process within the project.
  • Tell Foo-Tests to "Fingerprint all published artifacts" with no parameters (I was wondering if Hudson treated JUnit reports as artifacts behind the scenes). This caused an error since I hadn't explicitly defined any artifacts to publish.

I'm using Hudson 1.266.

Edit: I should note that I've found two questions on the Hudson Users mailing list that have no answers and would possibly help solve this:

解决方案

I was able to replicate your problem with Hudson 1.266. This a Hudson error, which was fixed in a later build (prior to 1.287), so either upgrade Hudson or use this two-click workaround: from the Project page, go first to Latest Build and then Aggregated Test Results.

The problem is that the Project page for Foo is only showing the Latest Test Results link, which has a URL like http://localhost:8080/hudson-1.266/job/Foo/lastBuild/testReport/. Since Foo has no tests of its own, this link has no JUnit XML file to reference and returns the error you mentioned. This was fixed somewhere between 1.266 and 1.287 by redirecting from latestBuild/testReport/ back up to latestBuild/ when there are no tests. The alternative for you in 1.266 is to, instead of clicking on Latest Test Results in the Project page, scroll down a bit and click on Latest Build under Permalinks. This will take you to the latestBuild/ URL, and from there you can click on Aggregated Test Result, which has a URL like http://localhost:8080/hudson-1.266/job/Foo/lastBuild/aggregatedTestReport/. On this page, all your test results from downstream projects will be available under the Drill Down section.

Unfortunately, there is still a problem with the Drill Down links, even in 1.287. From Foo, when you drill down to Foo-Tests as outlined above, you will be taken to a malformed URL, which looks like http://localhost:8080/hudson-1.287job/Foo-Tests/. You'll have to manually modify that URL to insert a / between the hudson context and the job path following it so that it looks like http://localhost:8080/hudson-1.287/job/Foo-Tests/. Then you will be able to actually see the downstream test results.

I haven't had a chance to look through the Hudson source to find the error, but there's already an issue open for this. Its issue 1574, and its been open for almost a year.

On a side note, I really love Hudson for CI, but their interface isn't as smooth as it could be. I look forward to their rework of the UI in ExtJS. Maybe thats what they're spending all their time on.

这篇关于“聚集下游测试结果”的问题在哈德森的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆