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

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

问题描述

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



你设置它吗?



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



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

解决方案



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




  • 每15分钟检查一次我们的Subversion版本库更新

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


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

    • 测试返回单元测试失败 main / code>,因此被视为构建错误




测试了使用UnitTest ++附带的XmlTestReporter生成输出文件的配置。 xUnit插件本身支持此输出以及任何其他输出可以转换,虽然我不得不更改版本0.1.3中提供的XSL文件,以获得测试历史记录的持续时间。



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


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

How exactly did you set it up?

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

EDIT: 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?

解决方案

We are actively doing this at my workplace.

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

  • 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

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天全站免登陆