Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable NUnit Adapter for given project?

Tags:

c#

nunit

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?

like image 400
Pablo Avatar asked Jun 15 '16 09:06

Pablo


1 Answers

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;

No tests in output

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.

Tests not running

As soon as I open Test Explorer however;

Tests now in output

Even if I close the window, tests continue to be discovered until I restart Visual Studio.

like image 116
Rob Prouse Avatar answered Oct 03 '22 09:10

Rob Prouse