IgnoreAttribute Class
TOC
Collapse the table of content
Expand the table of content

IgnoreAttribute Class

 

Indicates that a specific test should not be run. This class cannot be inherited.

Namespace:   Microsoft.VisualStudio.TestTools.UnitTesting
Assembly:  Microsoft.VisualStudio.QualityTools.UnitTestFramework (in Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll)

System.Object
  System.Attribute
    Microsoft.VisualStudio.TestTools.UnitTesting.IgnoreAttribute

[AttributeUsageAttribute(AttributeTargets.Class | AttributeTargets.Method, 
	AllowMultiple = false)]
public sealed class IgnoreAttribute : Attribute

NameDescription
System_CAPS_pubmethodIgnoreAttribute()

Initializes a new instance of the IgnoreAttribute class.

NameDescription
System_CAPS_pubpropertyTypeId

(Inherited from Attribute.)

NameDescription
System_CAPS_pubmethodEquals(Object)

(Inherited from Attribute.)

System_CAPS_pubmethodGetHashCode()

(Inherited from Attribute.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodIsDefaultAttribute()

(Inherited from Attribute.)

System_CAPS_pubmethodMatch(Object)

(Inherited from Attribute.)

System_CAPS_pubmethodToString()

(Inherited from Object.)

This should be used to temporarily exclude a specific test when you run a group of tests that contains it. This can be useful for not running a test that is blocking other tests from running because of errors in the code. This is better than commenting out code because the test is still compiled.

This sets the Test Enabled property of the test to false.

This attribute can be specified on a test method or class. There can be only a single instance of this attribute on a method or class.

For more information about how to use attributes, see Extending Metadata Using Attributes.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show:
© 2016 Microsoft