
The basic configuration is similar for both the Microsoft and Google Test frameworks. The following sections show the basic steps to get you started with C++ unit testing. Find them at Test adapter for Boost.Test and Test adapter for Google Test. You can download the Google Test adapter and Boost.Test Adapter extensions on the Visual Studio Marketplace. For more information, see How to: Use CTest in Visual Studio. For more information, see How to: Use Boost.Test in Visual Studio.ĬTest support is included with the C++ CMake tools component, which is part of the Desktop development with C++ workload. It's integrated with Test Explorer, but currently doesn't have a project template. For more information, see How to: Use Google Test in Visual Studio.īoost.Test is included as a default component of the Desktop development with C++ workload. It also has options you can configure via Tools > Options. Right-click on the solution node in Solution Explorer and choose Add > New Project on the shortcut menu to add the project template. It has a project template that you can add to a solution. Google Test Adapter is included as a default component of the Desktop development with C++ workload. Visual Studio 2017 and later (all editions)

Visual Studio 2017 and later (Professional and Enterprise) For more information, see Install third-party unit test frameworks. Several third-party adapters are available on the Visual Studio Marketplace.

A test adapter integrates unit tests with the Test Explorer window.

You can use the installed frameworks, or write your own test adapter for whatever framework you want to use within Visual Studio.

Some features such as Live Unit Testing, Coded UI Tests and IntelliTest aren't supported for C++.
