The following is the configuration of my development setup (not that much all of this is required; but i thought i would give this information anyway)
The solution that I am working on has a number of unit tests written in c# using Nunit. I am logged in as the Administrator. For some reason I cannot view the tests in the test explorer.
Upon opening the solution the error message displayed by VS is "Unexpected error detected. Check the output pane for details"
The output pane just mentions that there were 0 tests detected
I have tried everything from re-installing Nunit, repairing VS, to resetting the IDE and the windows layout. No success.
If i login as another user on my laptop, I am ABLE to view the tests in test explorer.
Given point no 4 above, can anyone help me to work my way backwards? Try to find out what the problem might be.
The only other painful option would be to reinstall VS. I dont want it to come to that.
Thanks in advance
Make sure that the nunit test adapter is available in Tools | Extensions & updates. I had a similar problem because i installed the test adapter as part of a project, I had to explicitly add it in the extensions & updates too. I hope this is the same problem that you are having here.
Also check this post : Tests magically disappeared from Test Explorer pane in Visual Studio 2013
One more thing, make sure the build checkbox is checked in Configuration Manager for your test project.
You have to install NUnit3TestAdapter extension for visual studio ,and you can get it from visual studio marketplace. https://marketplace.visualstudio.com/items?itemName=NUnitDevelopers.NUnit3TestAdapter
As Philip mentioned you have to also install Nunit Adapter in Tools >> Extensions and Updates and search online for Nunit test adapter and download it, then restart the Visual studio and it should discover all your test and now you can run it too. It worked for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With