Hudson,C ++和UnitTest ++ [英] Hudson, C++ and UnitTest++

查看:139
本文介绍了Hudson,C ++和UnitTest ++的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人使用 Hudson 作为C ++项目的连续集成服务器,使用UnitTest++ 作为测试库?

Has anyone used Hudson as a Continuous-Integration server for a C++ project using UnitTest++ as a testing library?

您是如何设置它的?

我知道以前有关于持续集成的几个问题,但我希望这个有一个更窄的范围。

I know there have been several questions on Continuous Integration before, but I hope this one has a narrower scope.

编辑:澄清一下我在寻找什么。当Unit-Tests失败时,我已经将构建设置为失败。我正在寻找像Hudson的JUnit支持。 UnitTest ++可以创建XML报告(请参见此处)。因此,如果有人知道如何将这些报告翻译成JUnit兼容,Hudson会知道如何吃它。

I'll clarify a bit on what I'm looking for. I already have the build set to fail when the Unit-Tests fail. I'm looking for something like Hudson's JUnit support. UnitTest++ can create XML reports (See here). So, perhaps if someone knows how to translate these reports to be JUnit compatible, Hudson will know how to eat it up?

推荐答案

目前,我们使用免费样式的软件项目:

Currently, we use a free-style software project to:


  • 每15分钟检查我们的Subversion存储库更新

  • 调用Windows批处理文件以清理并构建解决方案文件

    • 项目文件构建并作为后构建事件运行单元测试

    • 单元测试失败由测试返回 main(),因此被视为构建错误

    • Check our Subversion repository for updates every 15 minutes
    • Call a windows batch file to clean and build a solution file
      • Project files build and run unit tests as a post-build event
      • Unit test failures are returned by the test main(), thus treated as build errors

      使用UnitTest ++附带的XmlTestReporter生成输出文件。 xUnit插件本身支持此输出以及您可以转换的任何其他输出,但我已更改版本0.1.3中随附的XSL文件以获取测试历史记录中记录的持续时间。

      I have also tested a configuration that uses the XmlTestReporter included with UnitTest++ to generate output files. The xUnit plugin natively supports this output, along with any other output you can convert, although I had to change the XSL file that came with it in version 0.1.3 to get durations recorded in the test history.

      有很多事情我们想改进我们的整合;构建日志很长,很难解析,没有着色或突出等,但到目前为止它仍然对我们有好处。

      There are a lot of things we would like to improve about our integration; the build logs are long and hard to parse with no coloring or highlighting, etc., but so far it has still been beneficial to us.

      这篇关于Hudson,C ++和UnitTest ++的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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