I can add an attribute on a test to ignore it
[Test]
[Ignore("Foo Bar")]
Is there anyway to ignore all tests in a file (at the TestFixture level) ?
I can add an attribute on a test to ignore it
[Test]
[Ignore("Foo Bar")]
Is there anyway to ignore all tests in a file (at the TestFixture level) ?
Removing the [TestFixture] attribute from the class seems like it would work.
You can make the whole TestFixture "on-demand" by using the [Explicit] attribute. Then it's there when you want it, but only when you explicitly click on it.
As suggested, the [Explicit] attribute works well. You can also simply place the [Ignore()] attribute under the [TestFixture] attribute, as shown in the documentation:
http://www.nunit.org/index.php?p=ignore&r=2.5
Use [Ignore()] if you want the test to be flagged as ignored (and therefore you get the yellow bar if all other tests pass). Use [Explicit] if you want the test to be completely discounted (and therefore you get the green bar if all other tests pass).