How to ignore an entire unit test project using NUnit and ReSharper

I have a Visual Studio solution that contains several C # unit test projects based on NUnit. Our TeamCity environment selects specific unit test DLLs to run. However, when running unit tests in a solution locally using ReSharper, it runs everything. Is there a way to ignore entire projects without adding an Ignore attribute to every test equipment?

+7
c # unit-testing visual-studio nunit resharper
source share
3 answers

enter image description here

+10
source share

Alternatively, you can also add the Ignore flag to the project assembly, which disabled all tests inside.

In AssemblyInfos.cs add:

 [assembly: Ignore] 
+6
source share

Resharper has a Unit Test Explorer window, a structured list of your unit tests in your solution.

enter image description here

It is easy to select / exclude a test / class / project to compose any combination of tests in a test session. A combo group may also be useful in your case.

+3
source share

All Articles