NUnit ignore all tests

leora picture leora · Mar 30, 2009 · Viewed 9.3k times · Source

I can add an attribute on a test to ignore it

[Test]
[Ignore("Foo Bar")]

Is there any way to ignore all tests in a file (at the TestFixture level) ?

Answer

Chris Missal picture Chris Missal · Aug 1, 2009
[TestFixture, Ignore("reason")]
public class YourTestFixture { }

Or if you prefer to break your attributes out to one per line:

[TestFixture]
[Ignore("reason")]
public class YourTestFixture { }