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.

(16) Review
Visual Studio
Download (9,449)
E-mail Twitter Digg Facebook
Add to favorites
Reviews (16)
Q and A (38)
Sign in to write a review
Sort by:

by Matthias Vigelius | Fri 2:08 PM

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

  • Support for Visual Studio 2015
    4 Posts | Last post August 13, 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?
  • 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)
  • Running with VS 2015 Preview
    1 Posts | Last post March 04, 2015
    • Will this run with the 2015 Preview?  I don't see it in the Extension Manager.  
  • Failure with C# projects
    1 Posts | Last post February 26, 2015
    • 1) Create new C# console project with *test* name: "semtest"
      2) Implement Program.cs:
      namespace semtest
          class Program
              static void Main(string[] args)
      3) Test Explorer hangs.
      4) Build fails with message like () because semtest.exe is locked with GoogleTest Runner.
      Disable extension? I Cant! I have a C++ project in my solution (with tests)!
      There is a solution?
  • i want to use it with vs2012
    1 Posts | Last post December 11, 2014
      there is no extension, do you have any plan to support vs2012 ?
      or if you support, where should i get it ?
  • Custom test definition
    3 Posts | Last post November 06, 2014
    • I have added this define in my code
      #define R2_TEST_F(test_case_name, test_name)\
        TEST_F(test_case_name, test_name) { test_name <GTEST_TEST_CLASS_NAME_(test_case_name, test_name)> (this); }
      - Is there a way for your extension to detect this as a test?
      - Is your source code available if i want to patch it to detect my custom test definition?
      Otherwise, your extension works very well for normal google test.
    • I found your source code on github.
      Problem was : I had one test exe that was named test_xxxxxx.exe and it needed to be named xxxxx_test.exe to be detected by your extension.
    • kgt
      Thank you jablonski43, rename to xxTest.exe solved also my problem.
  • No longer found in 'Extensions and Updates' in VS2012 professional
    2 Posts | Last post November 03, 2014
    • Dear Markus,
      First of all: Thank you for this great extension. It helps a lot during for our daily business.
      Unfortunately we found out yesterday that the plugin is neither listed in VS2012 extension gallery (VS2012 won't find it) nor is installable manually.
      Is it still working for VS2012?
      If not: Can I get an old version?
      Best regards,
    • Joerg, I had the same problem and I found the latest working extension for 2012 on github: 
1 - 10 of 38 Items