I have a Visual Studio solution which contains a number of C# unit test projects based on NUnit. Our TeamCity environment selects the specific unit test DLLs to run. However, when running the unit tests in the solution locally using ReSharper, it runs everything. Is there a way of ignoring entire projects without having to put the Ignore
attribute on every single test fixture?
IgnoreAttribute (NUnit 2.0) The ignore attribute is an attribute to not run a test or test fixture for a period of time. The person marks either a Test or a TestFixture with the Ignore Attribute. The running program sees the attribute and does not run the test or tests.
When you add the [Ignore] attribute, the test will be ignored by the test runner. It will show up in Test Explorer with a warning icon and will count as Skipped.
Category
] attribute.As alternative you could also add the Ignore flag to the project assembly which disabled all tests inside.
In AssemblyInfos.cs add:
[assembly: Ignore]
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