Masteroxify
Masteroxify

Reputation: 241

visual studio 19/22 Nunit test doesn't run by nunit adapter

When I run nunit tests, these tests are run by ms tests engine/adapter. I cannot run my tests in nunit adapter. I have installed the following nugets

-NUnit 3.13.2

-Nunit3TestAdapter 3.15.0 (tried also in 4.0.0)

-Microsoft.NET.Test.SDK 16.11.0

Project .net framework 4.7.2. Also tested in .net core 3.1, the same result.

Additional I made sure that there is not anything wrong in my project and i created new nunit test project and there is the same. Tests are run only in ms test and ms test explorer shows. Do you have any idea why nunit test explorer cannot appear ?

Thanks in advance!

Below is auto generated nunit project by visual studio 22.

enter image description here

Upvotes: 4

Views: 3747

Answers (1)

Klaas-Jan de Groote
Klaas-Jan de Groote

Reputation: 11

You must install the NUnit 3 Test Adapter in Visual Studio 2019 NUnit 3 Test Adapter Extension

Go to Extensions-> Manage Extensions, click Online and search and install. You might be asked to restart Visual Studio.

AFAIK You need the packages for running the tests on the command line, say with dotnet test command.

Note: I can't find this extension for VS 2022. I use Resharper now to run the tests.

Upvotes: 1

Related Questions