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.

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

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

  • 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. 
  • Doesn't detect tests
    1 Posts | Last post September 04, 2014
    • I can't get the test runner to detect my tests, using VS2013 Ultimate. Is the only requirement that the exe is named [Tt]est[s].exe, or are there any other catches?
      Does the project type matter? Does it matter where the exe is located?
  • Running a test via vstest.console.exe
    1 Posts | Last post July 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?  
  • Running tests without solution build
    1 Posts | Last post July 07, 2014
    • Hi, Markus
      How can I start tests without solution building. I have about 160 projects at my solution, and even building after rebuild is very long operation. I want to use that test which I have right now. How can I find this setting?
  • Passing parameters to test executable
    1 Posts | Last post June 30, 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!
  • .runsettings setting is not persisted
    1 Posts | Last post June 18, 2014
    • I do not know if this has anything to do with this extension, microsofts test framework, or the fact that i use CMake to create my solutions, but i have the following problem:
      I cannot get Visual Studio to save which runsettings file to use for code coverage. I have tried adding the .runsettings file to the solution, but it does not change anything.
      When reading online, it seems as if it should just work.
  • Custom test definition
    2 Posts | Last post June 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.
  • Config file for test regex
    2 Posts | Last post May 16, 2014
    • It would be nice if we could change what the regex is looking for. I'm in an environment where all unittests end with UT.exe. If there was a config, or setting for what the parser looks for that would be great. Also making this part of the immediate description that having test.exe on the name of the unittest would have saved some time and unnecessary debugging.
    • I cloned the code and altered it so it checks for a different regex and it works. It would be nice if this was configurable though. It would break some of the assumptions in your unittests but it would be a nice flexibility option.
      Great work though, I love the extension!
  • Cannot Install plugin v1.7.1 in VS 2012 Premium
    3 Posts | Last post May 08, 2014
    • I recently tried upgrading from the v1.6.1 to v1.7.1 on a system with VS 2010 and 2012 Update 3. The installer exits with the error "This extension is not installable on any currently installed products. Did you stop supporting 2012?
      Install log follows:
      5/7/2014 10:19:04 AM - Microsoft VSIX Installer
      5/7/2014 10:19:04 AM - -------------------------------------------
      5/7/2014 10:19:04 AM - Initializing Install...
      5/7/2014 10:19:04 AM - Extension Details...
      5/7/2014 10:19:04 AM - 	Identifier      : GoogleTestRunner.Lindqvist.bbec4f9a-83fc-496a-9424-5bcfaa63f685
      5/7/2014 10:19:04 AM - 	Name            : GoogleTest Runner
      5/7/2014 10:19:04 AM - 	Author          : Markus Lindqvist
      5/7/2014 10:19:04 AM - 	Version         : 1.7.1
      5/7/2014 10:19:04 AM - 	Description     : Visual Studio 2013 extension for running C++ unit tests written with GoogleTest framework.
      Unit Test Runner (Adapter) for Google Test (gtest) unit testing framework.
      5/7/2014 10:19:04 AM - 	Locale          : en-US
      5/7/2014 10:19:04 AM - 	MoreInfoURL     :
      5/7/2014 10:19:04 AM - 	InstalledByMSI  : False
      5/7/2014 10:19:04 AM - 	SupportedFrameworkVersionRange : 4.5
      5/7/2014 10:19:04 AM - 	Supported Products : 
      5/7/2014 10:19:04 AM - 		Microsoft.VisualStudio.Pro
      5/7/2014 10:19:04 AM - 			Version : [12.0,13.0)
      5/7/2014 10:19:04 AM - 	References      : 
      5/7/2014 10:19:04 AM - Searching for applicable products...
      5/7/2014 10:19:04 AM - Found installed product - Microsoft Visual Studio 2010 Professional
      5/7/2014 10:19:04 AM - Found installed product - Microsoft Visual Studio Premium 2012
      5/7/2014 10:19:04 AM - Found installed product - Microsoft Visual Studio Professional 2012
      5/7/2014 10:19:04 AM - Found installed product - Microsoft LightSwitch for Visual Studio 2012
      5/7/2014 10:19:04 AM - Found installed product - Microsoft Visual Studio 2012 Shell (Integrated)
      5/7/2014 10:19:04 AM - Found install
    • Apologies the log got truncated
      5/7/2014 10:19:04 AM - Found installed product - Global Location
      5/7/2014 10:19:04 AM - VSIXInstaller.NoApplicableSKUsException: This extension is not installable on any currently installed products.
         at VSIXInstaller.App.InitializeInstall()
         at System.Threading.Tasks.Task.InnerInvoke()
         at System.Threading.Tasks.Task.Execute()
    • Latest release for VS2012 can be found here:
      I'm not planning to continue building the extension package for that version any more.
  • Multiple test projects within MS Solution.
    3 Posts | Last post May 08, 2014
    • Has anyone tried running multiple test projects ?
      Within my project it is only discovering tests for one of the projects.
      If I rename this file via Studio, then tests are not discovered.
      I will investigate further by creating a simpler solution/project file.
    • My mistake
      The project name I was not correct. It must be called ...[Tt]est.exe or ...[Tt]ests.exe.
      Maybe some rules like this should be documented somewhere.
    • It is actually written on the 'DESCRIPTION' tab for this Visual Studio extension;)
      Good you found it finally!
1 - 10 of 30 Items