Since I've installed NUnit Adapter, for all projects, even if NUnit is not used, discovery process is still taking place.
------ Discover test started ------
NUnit Adapter 3.2.0.0: Test discovery starting
Exception NUnit.Engine.NUnitEngineException, Exception thrown discovering tests in I:\src\...
Cannot run tests in process - a 32 bit process is required.
NUnit Adapter 3.2.0.0: Test discovery complete
========== Discover test finished: 0 found (0:00:00.1180118) ==========
How can I disable NUnit from discovering tests for given project?
I am pretty sure that all test adapters that you have installed run for all assemblies every time you build, NUnit is just a bit more verbose about it which is very annoying.
Tests won't be discovered though if the Test Explorer window is not open. Unfortunately, closing the window isn't enough, you need to close it, then restart Visual Studio.
Update: Based on the comments, also make sure that Keep Test Execution Engine Running is not checked.
The following is on my system running Visual Studio 2015 Update 2;
Test Explorer Window Closed, Rebuild All;
Notice, no test discovery or Test in the dropdown. You can also see in the Test | Test Settings that the test engine is not running because the menu options are disabled.
As soon as I open Test Explorer however;
Even if I close the window, tests continue to be discovered until I restart Visual Studio.
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