Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable all tests in my class [TestClass]

Can I disable all my tests in my class?

I am using namespace Microsoft.VisualStudio.TestTools.UnitTesting;

Single tests can be ignored with the [Ignored] attribute.

like image 355
Claysson Avatar asked Aug 29 '13 11:08

Claysson


People also ask

How do you disable a test class in Java?

If you want to ignore all the tests of class, use @Ignore annotation at the class level.

How do I ignore tests in xUnit?

xUnit.net does not require an attribute for a test class; it looks for all test methods in all public (exported) classes in the assembly. Set the Skip parameter on the [Fact] attribute to temporarily skip a test.


1 Answers

You can do this by placing the Ignore attribute on your class. If you look at the documentation of the IgnoreAttribute Class you will see that it can be applied both to methods and to classes.

like image 138
Wouter de Kort Avatar answered Oct 19 '22 19:10

Wouter de Kort