Resharper 2020.3 test runner does not find XUnit tests for .NET Core in VS 2019 16.8.3
I have used NUnit for years with Resharper, no issues. I am currently evaluating XUnit, but I find that I can only get unit test to run using the native Visual Studio test runner, not with the (alleged) JetBrains one. All my resharper XUnit related settings are at defaults. Ive tried with .NET Core 5.0 and .NET Core 3.1. My project references the xunit, xunit.runner.visualstudio and Microsoft.NET.Test.Sdk packages.
Is there something dumb I am doing wrong? I've tried with a completely blank simple project as well using: dotnet new xunit -n TestProject
The built in VS test runner works ok so it can be argued that the Resharper runner "isn't needed" but I was under the illusion that Resharper had XUnit support baked into it nowadays. Unfortunately most googling returns articles from years ago that don't appear to be relevant.
Please sign in to leave a comment.
Hello Grant Drake,
Could you please run R# in internal mode using "Ctrl+Alt+Shift+0", then press "Yes" and open "ReSharper | Options | Tools | Unit Testing | Test Frameworks | xUnit.net"? Is the "Enable xUnit.net support" option enabled here?
Hi Maria, no that options wasnt enabled there. I guess my question now is why is such a seemingly important option hidden and why wasnt it turned on? I have never touched it in the past (having never used xunit before)?
On the plus side, once I enabled it (and exited internal mode), the unit test runner now works...
Grant Drake, thank you for your reply.
This is a good question. We wanted to do our best to make life easier for users. But something went wrong... We'll think about what we can do.
Merry Christmas!