Поделиться через


CIConditionAttribute Class

Definition

This attribute is used to conditionally control whether a test class or a test method will run or be ignored based on whether the test is running in a CI environment.

[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=false)]
public sealed class CIConditionAttribute : Microsoft.VisualStudio.TestTools.UnitTesting.ConditionBaseAttribute
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=false)>]
type CIConditionAttribute = class
    inherit ConditionBaseAttribute
Public NotInheritable Class CIConditionAttribute
Inherits ConditionBaseAttribute
Inheritance
CIConditionAttribute
Attributes

Remarks

This attribute isn't inherited. Applying it to a base class will not affect derived classes.

Constructors

CIConditionAttribute(ConditionMode)

Initializes a new instance of the CIConditionAttribute class.

Properties

GroupName

Gets the group name for this attribute.

IgnoreMessage

Gets or sets the ignore message (in case ShouldRun returns false) indicating the reason for ignoring the test method or test class.

Mode

Gets the condition mode.

(Inherited from ConditionBaseAttribute)
ShouldRun

Gets a value indicating whether the test method or test class should run.

Applies to