问题描述
我们正在考虑从phpundercontrol切换到Hudson(它似乎具有一些非常酷的功能!),但是我不知道如何显示phpunit日志.
We are looking at switching from phpundercontrol to Hudson (it looks to have some really cool features!) but I can't figure out how to get phpunit logs to show up.
我在hudson上使用ant正常运行phpunit,并且--log-xml将phpunit.xml放入该版本的适当builds/文件夹中.但是我不知道如何在构建中显示它,以便我们可以查看运行的测试以及失败的测试.
I have phpunit running fine in Hudson with ant, and --log-xml is putting a phpunit.xml in the appropriate builds/ folder for that build. But I can't figure out how to get that to show up for the build, so that we can see the tests the ran and which failed, if any.
我弄清楚了之后,接下来就是覆盖率,指标和api了:)
After I figure that out, getting coverage, metrics, and api will be next :)
对于任何在HTML上生成它的东西来说,似乎都是微不足道的,例如告诉哈德森:对于此项目,请为每个版本显示指向'API'的链接,并指向builds/$ BUILDNUM/api/index.html .
It seems like it should be trivial for anything which generates its on HTML, to tell Hudson for example "For this project show a link to 'API' for each build and link to builds/$BUILDNUM/api/index.html".
推荐答案
我安装了xUnit插件,将其指向我的日志文件(来自作业配置),它像一个超级按钮一样工作.看来不再需要任何自定义技巧.
I installed the xUnit plugin, pointed it at my log file (from job config), and it works like a charm. It appears there is no longer a need for any custom hacks.
http://wiki.hudson-ci.org/display/HUDSON/xUnit +插件
这篇关于我如何将phpunit与Hudson CI集成?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!