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

1 Answer 1

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

Sign up to request clarification or add additional context in comments.

2 Comments

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.
Microsoft Build Tools 2015 also contains VSTest.Console.exe. Can also be found at other locations (github.com/Microsoft/testfx/issues/287)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.