I have a .NET 6 project with xUnit unit tests opened in Visual Studio 2022.
I see the unit tests in the Test Explorer window and when I click to Run it builds the project but doesn't run any of them.
I have a .NET 6 project with xUnit unit tests opened in Visual Studio 2022.
I see the unit tests in the Test Explorer window and when I click to Run it builds the project but doesn't run any of them.
There might be multiple causes for this, what worked for me was either:
dotnet test MyProject.Tests.Unit.csproj
, after navigating to the unit test project's folder, with my specific csproj
name there.After that I still had issues with new unit tests added, Test Explorer was either skipping them, or running old versions of them. Doing one of the two options above got the unit tests running correctly. Although it's still weird, Test Explorer should just work.
Last Edit | July 9, 2024 |
Created | July 9, 2024 |
Views | 108 |
Tags |
Visual Studio
xUnit
|
Do you like this website?
Bookmark it and come back here to write a post yourself when you run into something shareable.
Early collaborators will get to own a part of the project (5 to 20%)... >> read more