Skip to content
| Marketplace
Sign in
Visual Studio>Tools>GoogleTestAddIn
GoogleTestAddIn

GoogleTestAddIn

Ovaron1995

|
2,076 clicks
| (0) | Free
Add-In for Visual Studio 2010 and 2008 to execute/debug googletest functions by selecting them.
Get Started

GoogleTestAddin

GoogleTestAddin is an Add-In for Visual Studio 2010 and 2008. It makes it easier to execute/debug googletest
functions by selecting them. You'll no longer have to set the command arguments of your test application.

The output of the googletest console application is redirected tothe a additional Visual Studio output window.
The benefit here is, that if any test fails then the information about the failed test is written to the output where it
can be double clicked to jump to the source line.

How to install the Add-In on Visual Studio 2008

Place the two files GoogleTestAddIn.AddIn andGoogleTestAddin.dll into the following folder:

C:\Users\<Username>\Documents\Visual Studio 2008\Addins

 

How to install the Add-In on Visual Studio 2010

Place the two files GoogleTestAddIn.AddIn andGoogleTestAddin.dll into the following folder:

C:\Users\<Username>\Documents\Visual Studio 2010\Addins

 Start Visual Studio 2008/2010 and the Add-In can be found listed under Tools -> Add-in Manager.          

 
The Add-In adds three buttons to the toolbar of Visual Studio
2008/2010 and adds three items to the
code context menu of Visual Studio
2008/2010. They are activated only when a C++ project is loaded.

 Buttons added by the Add-in

The function behind this three buttons/items is:

  1. Execute all test and redirect the output to the “GoggleTest” output pane in Visual Studio.
  2. Execute the selected test or test function and redirect the output to the “GoggleTest” output pane in Visual Studio.
  3. Debug the selected test or test function. At this mode the output is not redirected to the output pane.
 

How to use the Addin with Visual Studio 2008/2010

In your test code you will use the following to define a test function:

TEST ( TestName, TestFunction )
{
      …
      EXPECT_EQ( … );
      …
}

Or

TEST_F ( CTestClass, TestFunction )
{
      …
      EXPECT_EQ( … );
      …
}

Now you can select which part of the tests shouldbe  executed/debugged with the following selections:

 

TEST (TestName, TestFunction )

Executes/Debug only the function TestFunction within the test TestName.
Calls the test application with the option --gtest_filter=TestName.TestFunction

TEST (TestName, TestFunction )

Executes/Debug all functions within the test TestName.
Calls the test application with the option --gtest_filter=TestName.*

 

The following output is generated by the Add-in:

Output of the GoogleTest Add-in

Output with failed test:

Output of a failed test

Thats it.

 

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft