GoogleTest Runner


Visual Studio 2013 extension for running C++ unit tests written with GoogleTest framework. Unit Test Runner (Adapter) for Google Test (gtest) unit testing framework.

(19) Review
Visual Studio
Download (10,494)
E-mail Twitter Digg Facebook
Add to favorites
Reviews (19)
Q and A (43)
Sign in to write a review
Sort by:

by JDeveloper70 | November 07 2015

Works great on Visual Studio 2013 - Update 5 on windows 10 - Many thanks!

by Pawel Kadluczka - MSFT | November 06 2015

A great tool! Will save you a lot of hassle with changing the --gtest_filter in the debug options.
For VS2015 either unpack the vsix and update the manifest or download a VS 2015 compatible from the project github repo.

by Morten Already In Use | October 29 2015

Works like a charm. I have a few minor things that I would like to have changed, but those are details (see Q and A for more info).

by Matthias Vigelius | August 28 2015

Works great.. makes life heaps easier.

by Dmitri Nesteruk | August 24 2015

It works, but for comprehensive support of Google Test in Visual Studio you might want to consider ReSharper C++. Check out this screencast for a detailed walkthrough:

by Jakob van Bethlehem | July 27 2015

Found this nice adapter, but can't use it because the regular expression used to match tests is overly strict. I don't want to rename all my 100s of tests. Please make the regular expression configurable, or allow the word 'Test' to either appear at the beginning or ending of the executable name.

by Arkady Shapkin | July 17 2015

by Tommy Santerre | March 21 2015

Great work, makes it much easier to work with gtest.

by Kim Gentes | March 11 2015

An excellent adapter. Works precisely as you expect. Thank you!

by Dmitry N Zolotarev | February 25 2015

Great tool!

by John Digital | February 14 2015

Works great. To get started you need to download and install Google Test from google's website.
Instructions are here:
Then use these instructions to have the results of google test show up in "Test Explorer" inside of the VS IDE.

by Unril | November 08 2014

Works just fine. If you use it with Qt do not forget to add path to Qt dll files to PATH variable or copy required dlls and pdbs to the folder with executable. Without it this runner will not work.

by WalkingCat | April 23 2014

by Joerg Schw | December 17 2013

Great! Just what I needed to integrate running the tests within visual studio - without misusing the post-build step.

by Patrik Olesen | October 24 2013

A very nice small tool that does what it says. It would been nice if the error printouts were linked to the editor

by Szymon Gatner | September 12 2013

Great tool. Better than competition because properly jumps to test code when double-clicking test name in the panel.

by tscott98 | September 11 2013

This is a useful front-end to the google test framework. Does as advertised.

by svaha1728 | September 10 2013

This is a great addition to the VS Test Runner! Thank you so much!

by Layl Conway | September 10 2013

Does exactly what it says, though you'll have to install a specific package if you're using VS2013 Preview.

Sign in to start a discussion

  • Fails to install on Windows 10 with .NET 4.6
    2 Posts | Last post Mon 7:04 PM
    • I have Visual Studio 2013 running on Windows 10. I have .NET Framework 4.6 installed. When I try to install the extension, it fails. From the logs I see that the reason is that the only supported version is .NET 4.5. I cannot install bot 4.5 and 4.6 at the same time, as .NET 4.5 installer refuses it.
    • As I've attempted to fix the issue by cloning the repo and fixing the code, I had to install VS 2015 and Visual F#. Surprisingly, once I've finished the installation, I was able to install the plugin without making any changes. Not sure what it was, but probably so components installed with VS 2015 were missing.
  • Visual Studio 2015 version - TestResults are empty
    1 Posts | Last post November 10, 2015
    • I have successfully downloaded and used the extension on Visual Studio 2015.  It works great and all gtests are discovered in Visual Studio Test Explorer.
      However, the extension is producing empty folders under the default TestResult folder.  Shouldn't the extension produce something?
      The same thing is reproduced when using the vstest.console.exe command to call the unit test.  As a workaround, to produce TestResults one need to pass the /Logger option (at least it is working with /Logger:trx option).
      e.g. vstest.console.exe Calculator.Tests.exe /EnableCodeCoverage /UseVsixExtensions:true /Logger:trx
  • Visual Studio 2015 verison is now available in the Visual Studio Gallery
    1 Posts | Last post October 22, 2015
  • Download link for Visual Studio 2015
    1 Posts | Last post October 22, 2015
    • Latest Visual Studio 2015 package is available on GitHub:
  • How to run the GoogleTestRunnerTests
    1 Posts | Last post October 13, 2015
    • Hi,
      What must I do (or what web page must I read) to run the tests that ship with the extension's source code please?
      I mean the FsUnit-based tests of the extension itself.
      Thanks for any help!
  • Support for Visual Studio 2015
    5 Posts | Last post September 21, 2015
    • I noticed this Extension doesn't support VS2015, and I can't find a copy that does. Is this coming soon?
    • If you do not want to wait for a new build, you can also get it working with Visual Studio 2015 by editing the extension manifest manually:
      - Download the ".vsix" file (link above)
      - Unpack the file (it's just a ZIP)
      - Edit the file 'extension.vsixmanifest' and
      - Replace the <InstallationTarget> with the following: <InstallationTarget Id="Microsoft.VisualStudio.Community" Version="[14.0,]" />
      - Create a ZIP archive including all files and change the file extension back to ".vsix"
      - Double-click to install
      This way, I got it working in Visual Studio 2015.
    • Any news on a new version/build that works correctly with VS2015 RTM?
    • I installed the extension in VS 2015 using Daniel Joos's suggestion.  However, Test Explorer isn't discovering any tests from my test project.  This used to work fine in VS 2013.
      As far as I can tell, my executable isn't even being run to discover the tests.  I can run the tests themselves just fine by executing the project.
      Anyone have any ideas?
    • Had same problem after windows 10 upgrade.
      For me the plugin wasn't loading because .net 3.5 wasn't installed. 
      Works fine. 
      Also working with TFS 2015.
  • Reduce warning level of debug messages
    1 Posts | Last post July 31, 2015
    • Change Request: When the GoogleTest Runner is looking for symbols in a test executable, it outputs messages like:
      Loading symbols from <my>.exe
      From <my>.exe, found <n> symbols in <n> ms
      These messages are set as warnings, which, also makes them appear as warnings in automated build systems like TFS. Would it be possible to reduce their level from warning to debug or informational? This would remove the "warnings" , which makes it easier to make sure that new warnings are not being added due to less clutter.
  • Error message while it reads the results
    4 Posts | Last post July 29, 2015
    • I'm suddenly getting this error, is that due to a bug in the extension? The error seem to indicate problems parsing the XML result file:
      ------ Run test started ------
      Found 33 tests, resolving symbols
      Loading symbols from C:\Users\Thomas\SourceTree\SUbD\Test\SUbD_UnitTest.exe
      From C:\Users\Thomas\SourceTree\SUbD\Test\SUbD_UnitTest.exe, found 33 symbols in 71 ms
      In C:\Users\Thomas\SourceTree\SUbD\Test, running: C:\Users\Thomas\SourceTree\SUbD\Test\SUbD_UnitTest.exe  --gtest_output="xml:C:\Users\Thomas\AppData\Local\Temp\tmp9313.tmp" 
      Root element is missing.
         at System.Xml.XmlTextReaderImpl.Throw(Exception e)
         at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
         at System.Xml.XmlTextReaderImpl.Read()
         at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)
         at System.Xml.Linq.XDocument.Parse(String text, LoadOptions options)
         at GoogleTestRunner.ResultParser.getResults(IMessageLogger logger, String outputPath, FSharpList`1 testCases)
         at GoogleTestRunner.GoogleTestExecutor.runOnce(IFrameworkHandle framework, IRunContext runContext, FSharpList`1 allCases, FSharpList`1 cases, String executable, Boolean runAll)
         at GoogleTestRunner.GoogleTestExecutor.runTests(FSharpList`1 allCases, IEnumerable`1 cases, IRunContext runContext, IFrameworkHandle framework, Boolean runAll)
      No test is available in C:\Users\Thomas\SourceTree\SUbD\Test\SUbD_UnitTest.exe. Make sure that installed test discoverers & executors, platform & framework version settings are appropriate and try again.
      ========== Run test finished: 0 run (0:00:08.1626713) ==========
    • `tmp9313.tmp` turned out to be empty.
    • I had the exact same problem and it was caused by the fact that the character set of my test project was set to UNICODE. Changing it to multibyte character set solved the problem (project->properties->general->character set).
      To get the Google test runner to work I also had to change the signature of the auto generated main method to int _tmain(int argc, char *argv[]).
    • As ThomThom noted, if something causes the gtest executable to exit during test execution the output xml file is empty. I experienced the issue with a regular C++ assert (from assert.h). It would be nice if the test runner was expanded to create a xml file with an appropriate error message, e.g. "Test exited before writing xml output", or something like that.
  • Navigation issue with TEST_P under x64
    1 Posts | Last post April 27, 2015
    • I have a solution compiled under x64. Parameter tests (TEST_P) are executed, but the Source: entry contains either "TestBody" (when << is defined for the parameter struc) or nothing (when not) and the navigation to the source code does not work. For TEST_F everything works as expected. 
      Any idea what could be the reason? Changing the Default Processor Architecture under Test => Test Settings did not help.
  • Analyzing Code Coverage in Build Service with GoogleTestRunner and GTEST
    2 Posts | Last post March 11, 2015
    • I have this adapter running and works well. But I want to have this incorporated into my build process. Not just the unit test execution but the Code Coverage analysis as well.
      There are plenty of places in MSDN documentation that point to the ability to customize the build service to both run your unit tests and to turn on code coverage analysis during that process.
      BUT I cannot find how I might configure my NON-Team version of Visual Studio 2013 (Premium) to run and analyze my GTEST unit tests. I have them running in a post-build step run now, but I want them to run and analyze for code coverage.  Of course, I can run them in the Test Explorer, but I want them incorporated into the build process.
      Just FYI here is the stuff I have read already.
      the "Analyzing code coverage in the build service" section in
      This separate help
      The for customizing command line.
      And various places that help explain customize run settings in a build definition
    • I figured out how to do the code coverage via command line directly (once the GoogleTestRunner plugin is installed).  This allows you to put it in the build process as well.
      You must use the vstest.console.exe command, with the extension and code coverage switches. Here is an example of how that works--
      vstest.console.exe YourTest.exe /UseVsixExtensions:true /EnableCodeCoverage /Settings:test.runsettings /inIsolation
      Using that format, everything works properly.
      NOTE: you must have Visual Studio Premium or Ultimate for this to work (I am using this *without* TFS)
1 - 10 of 43 Items