Running boost unit test console applications as part of Teamcity build

别说谁变了你拦得住时间么 提交于 2019-12-14 03:53:36

问题


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).

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

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.


回答1:


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. Download and add to the unit tests project the TeamCity files for boost from http://confluence.jetbrains.net/display/TW/Cpp+Unit+Test+Reporting

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

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

  3. Add this batch file to source control.

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

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



来源:https://stackoverflow.com/questions/3491489/running-boost-unit-test-console-applications-as-part-of-teamcity-build

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!