views:

55

answers:

1

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.

A: 

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

Quant
Awesome, just tried it out and it works, thanks!!!
Ralf