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.

(14) Review
Visual Studio
Download (8,686)
E-mail Twitter Digg Facebook
Add to favorites
Reviews (14)
Q and A (36)
Sign in to write a review
Sort by:

by Arkady Shapkin | May 13 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 Dmitri Nesteruk | April 15 2014

It works, which is all that you need from it.

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

  • 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: 
  • Running a test via vstest.console.exe
    2 Posts | Last post September 23, 2014
    • Hi Markus, 
      Fabulous extension!  Works great from within Visual Studio!  I like it so much, I'm trying to get it to work from a visual studio online build, which I've been unsuccessful so far.  From what I've been able to gather, it appears to use vstest.console.exe to execute the tests with an adapter path specified.   
      Have you been able to run a local googletest executable via vstest.console.exe passing in the /TestAdapterPath:<PathToGooglTestRunnerBins> parameter? I'm finding that it's not able to discover the tests for some reason.  On my development machine with the vsix installed, I can run vstest.console.exe /UseVsixExtensions:true /ListDiscoverers and this shows the GoogleTestRunner.GoogleTestDiscoverer.  However running /ListDiscoverers with the TestAdapterPath does *not* show the discoverer.  
      Any idea what might be going on here?  
    • Hi Drew.
      I once tried the Visual Studio online, too, but couldn't get it working right away. Currently I don't have the required time and interest to investigate this further, but if you or someone else figures out if there's a problem in the GoogleTest Runner, I'm happy to apply any pull requests and build an update.
      Best Regards,
  • Passing parameters to test executable
    2 Posts | Last post September 23, 2014
    • Hi Markus,
      My test binary accepts various command-line parameters, like log level or log file location which I want to pass when I run the test.
      Is there way to do it?
      (I understand that UT should be self-contained with only boolean result, but gtest is convenient for other kinds of tests too).
      Thanks for great extension!
    • I'm sorry, but unfortunately it is not possible in the framework Microsoft provides for unit testing adapters. Could you possibly read the information from a configuration file?
  • Value parameterized tests
    7 Posts | Last post September 14, 2014
    • Hi Markus!
      Thank you for the great implementation of the test adapter.
      I have two problems with the adapter.
      We use GTest 1.7 and some parameterized tests are not detected as run. In the tree they are viewed and in the xml output file they are, but no result is viewed and an error message in the output window appears.
      Message in the Test Output Window
      Coudln't find result for VerifyStoreFailDetected_param/StoreRetConsidered4Numbers_fixCRatedNetConfig._IsSetINIResultConsidered_ResultFollowSetINIResult/6  # GetParam() = (000000013F7566F8, false)
      In the Xml file exists.
      <testcase name="_IsSetINIResultConsidered_ResultFollowSetINIResult/6" value_param="(000000013F8866F8, false)" status="run" time="0" classname="VerifyStoreFailDetected_param/StoreRetConsidered4Numbers_fixCRatedNetConfig" />
      A 2nd one. When the test are in an exe and all tests should run, it is really necessary to specify they all in the command line? This produces not running test cases. With the “global” run all it works but take much more longer time.
      Thank you for the help.
    • Hi Alfred.
      Could you provide a complete, buildable solution for me to test with? I tried with simple cases of value-parametrized tests and the extension worked nicely.
    • Hi Markus!
      Thank you for investigate my problem.
      In the packet gmock-1.7.0 is under gmock-1.7.0\msvc\2010 the test project located. With small modification it can be compiled in vs2012.
      1.	To all three projects I have add to the preprocessor definitions _VARIADIC_MAX=10;
      2.	When compile some warnings appears, but the exe with the tests will run. Don’t be worry some tests take s “little” longer.
      3.	It’s possible to run the test form the test explorer, but for all parameterized tests is the result reported as missing. In the temorary xml output they are.
      I hope this will help! When not please tell me and I will create a project with not so much tests.
      Best reagards
    • Markus,
      I believe that Alfred4822's first issue is because he is using Gtest 1.7.0. The output strings for parametrized tests are formatted differently in the newest release and the Google Test Runner parsing code doesn't recognize this new format.
      ParameterizedCutOnStateEarlyOffTimers/CutOnStateEarlyOffTimersTest.CutOnStateEarlyOffTimers/0  # GetParam() = (false, 0, 0)
      I tried to look/edit your source code at but you don't include or mention which F# libraries you are using (default set from MS isn't correct). References to FSharp.Core, .Data, and .Data.DesignTime are unresolved.
    • I got your source to build. VS2012 SDK wasn't enough. Also had to pull down FSharp.Data from here:
      Also, your project specifically references FSharp.Core which I believe is only included with VS2013. So I had to dumb down the reference to the FSharp.Core 4.3.0 that was installed with the SDK.
    • Hello and thanks for this great plug-in! I ran into this problem when running more than one parameterized tests in one go. Only the first test gets executed and it seems to be because gtest does not interpret the command line --getest_filter parameter due to the "# GetParam() .." statements. Are there any suggested workarounds?
    • As a work around, I modified (argc, argv) in my test program's main() before passing them to InitGoogleTest, removing the "# GetParam() .." parts. 
1 - 10 of 36 Items