Test Explorer in Visual Studio 2022 is not working

Viewed 7075

When I click Run All tests in view, it's running but not showing that tests are passed or failed. I mean it's showing blue marks as shown before]

When I click Run All tests in view, it's running but not showing that tests are passed or failed. I mean it's showing blue marks as shown before

3 Answers

Try invoking them by running the command in console

dotnet test

If that doesn't help it could be that the NUnit 3 Test Adapter is missing and you need to reinstall it.

I also suggest you to view the error output of your test runner to get some more information by opening the output panel (by clicking on view-->output), then choosing "tests" (from the 'Show output from' dropdown) and you'll get the specific problem.

Another way to find this is to check the Output window. Once you've triggered an action from the Test Explorer, there should be a Tests pane in the Output Window, and it likely would have also given you an answer.

For example: Output window set to show output from Tests

enter image description here

VS 2019 & VS 2022: I had to uncheck this box under Test > Options

Related