升压运行单元测试的控制台应用程序作为TeamCity的构建的一部分 [英] Running boost unit test console applications as part of Teamcity build

查看:165
本文介绍了升压运行单元测试的控制台应用程序作为TeamCity的构建的一部分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我们的应用中,有单元测试控制台应用程序一堆已使用升压单元测试框架编写的。这些测试应用程序构成了Visual Studio解决方案的一部分,(我们使用VS2008专业版)。

In our application, there are a bunch of unit test console applications that have been written using the boost unit test framework. These test applications form part of the Visual Studio Solution (we are using VS2008 Professional).

是否有可能运行这些作为TeamCity的建设的一部分?

Is it possible to run these as part of a Teamcity build?

到目前为止,我已经配置TeamCity的退房从Subversion最新的源代码,并建立它。现在我想运行这些控制台应用程序作为最后生成步骤。我想AP preciate如何去这个问题的任何建议。

So far I have configured Teamcity to check out the latest source from subversion and build it. Now I would like to run these console applications as a final build step. I would appreciate any advice on how to go about this.

推荐答案

是的,这是可能有升压单元测试报告和统计数据为TeamCity的构建的一部分。

Yes, it is possible to have boost unit tests reports and stats as part of a TeamCity build.

下面是如何我都做到了,如果单元测试项目:

Here is how I have done it, for a single unit tests project:


  1. 下载并添加到单元测试项目的TeamCity的文件从<提振href=\"http://confluence.jetbrains.net/display/TW/Cpp+Unit+Test+Reporting\">http://confluence.jetbrains.net/display/TW/Cpp+Unit+Test+Reporting

创建调用单元测试可执行一个批处理文件,例如搭配:

Create a batch file that calls the unit tests executable, e.g. with:

调用.. \\ .. \\发布\\ UnitTests.exe --result_ code =无--report_level =没有

call ..\..\Release\UnitTests.exe --result_code=no --report_level=no

添加此批处理文件的源代码控制。

Add this batch file to source control.

已经运行的单元测试项目的生成后事件的批处理文件。

Have the batch file run as a Post-Build Event of the unit tests project.

现在每一次成功的TeamCity构建应运行测试,并报告有多少合格/不合格,每次多长时间,等等...

Now each successful TeamCity build should run the tests and report how many passed/failed, how long each took, etc...

这篇关于升压运行单元测试的控制台应用程序作为TeamCity的构建的一部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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