沃梦达 / 编程问答 / php问题 / 正文

如何将 phpunit 与 Hudson CI 集成?

How might I integrate phpunit with Hudson CI?(如何将 phpunit 与 Hudson CI 集成?)

本文介绍了如何将 phpunit 与 Hudson CI 集成?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在考虑从 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.

我的 phpunit 在 Hudson 中使用 ant 运行良好,并且 --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 上生成它的东西来说,它似乎应该是微不足道的,例如告诉 Hudson 对于这个项目,显示每个构建的‘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 插件,将它指向我的日志文件(来自作业配置),它就像一个魅力.似乎不再需要任何自定义 hack.

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 集成?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:如何将 phpunit 与 Hudson CI 集成?

基础教程推荐