Install unit test frameworks

Visual Studio Test Explorer can run any unit test framework that has developed an adapter interface for the Explorer. The install program of the framework installs the binaries and adds Visual Studio project templates for the languages it supports. When you create a project with the template, the framework is registered with Test Explorer. A Visual Studio solution can contain unit test projects that use different frameworks and that are targeted at different languages. The Test Explorer runs them all.

MSTest is the test framework provided by Visual Studio and is installed with Visual Studio by default.

Acquire frameworks

You can download and install third-party unit test frameworks by using the Visual Studio Extension Manager or from Visual Studio Marketplace. Frameworks can also be downloaded from other sites such as the website of the framework.

Install from Visual Studio

  1. Choose Tools > Extensions and Updates.
  1. Choose Extensions > Manage Extensions.
  1. Expand Online > Visual Studio Marketplace > Tools, and then choose Testing.

  2. Browse the list to find the framework.

  3. Select the framework and choose Download.

For more information see Find and use Visual Studio extensions.

Install from the web

If you know the framework you are interested in:

  1. Open Visual Studio Marketplace.

  2. Type the name of the framework in the Find box.

  3. Choose the framework in the results list to navigate to the Visual Studio Marketplace page for the tool.

To browse a list of frameworks along with other testing tools:

  1. Open Visual Studio Marketplace.

  2. In Filter by category / collection, choose See all.

  3. In the Category list (labeled as Showing), expand the Tools node and then choose Testing.

  4. Choose a framework in the results list to navigate to a Visual Studio Marketplace page for the tool.

Update to the latest test adapters

Update to the latest stable test adapter to experience better test discovery and execution. For more information about updates to MSTest, NUnit, and xUnit test adapters, see the Visual Studio blog.

To update to the latest stable test adapter version

  1. Open the Nuget Package Manager for your solution by navigating to Tools > NuGet Package Manager > Manage NuGet Packages for Solution.

  2. Click on the Updates tab and search for MSTest, NUnit, or xUnit test adapters that are installed.

  3. Select each test adapter, and then select the latest stable version in the drop-down menu.

  4. Choose the Install button.

    Upgrade Test Adapter

See also