2

We have a Visual Studio 2015 solution containing some C++ projects and some tests based on Google Test Framework.

Now I would like to run those tests with the quite new TFS 2015 build features. I know that there is the "Visual Studio Test" build step that is able to run custom test adapters (like the Google Test Adapter?).

Is this the easiest way to setup things? What exactly has to be installed on the (on premise) TFS2015 build server and how to configure the build steps?

Thanks for you help! Sebastian

Sebastian
  • 173
  • 10

1 Answers1

1

Yes, the simplest way is just using google test adapter in ""Visual Studio Test" build " task. Just as the feature statement which will using VSTest.Console.exe

You need to install visual studio on your build server(agent). About how to conigure the build steps, there has been a detailed tutorial with Xunit test which also applies to google test. Plesae refer this blog: Running xUnit tests in TFS Build vNext

PatrickLu-MSFT
  • 49,478
  • 5
  • 35
  • 62
  • 1
    This worked fine. Thx. You can download the Google Test Adapter as Visual Studio Extension, unzip it (rename .vsix file to .zip) and place that entire unzipped folder somewhere on your Build machine. The TFS build step then has to point to that directory as explained in your link. Additionally of course, the C++ project should include the "googletest" NuGet package in order to run the tests. – Sebastian Nov 08 '16 at 11:03
  • Microsoft Build Tools 2015 also contains ``VSTest.Console.exe``. Can also be found at other locations (https://github.com/Microsoft/testfx/issues/287) – Ben Aug 15 '18 at 15:19