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.
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
- Choose Tools > Extensions and Updates.
- Choose Extensions > Manage Extensions.
Expand Online > Visual Studio Marketplace > Tools, and then choose Testing.
Browse the list to find the framework.
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:
Type the name of the framework in the Find box.
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:
In Filter by category / collection, choose See all.
In the Category list (labeled as Showing), expand the Tools node and then choose Testing.
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
Open the Nuget Package Manager for your solution by navigating to Tools > NuGet Package Manager > Manage NuGet Packages for Solution.
Click on the Updates tab and search for MSTest, NUnit, or xUnit test adapters that are installed.
Select each test adapter, and then select the latest stable version in the drop-down menu.
Choose the Install button.
We’d love to hear your thoughts. Choose the type you’d like to provide:
Our feedback system is built on GitHub Issues. Read more on our blog.