Condition rules are executed in a conditional loop or statement. These rules are intended to decide whether the body of the loop or statement must be executed.
Inheritance Hierarchy
Object
  Microsoft.VisualStudio.TestTools.WebTesting.ConditionalRule
    More...
Namespace:  Microsoft.VisualStudio.TestTools.WebTesting
Assembly:  Microsoft.VisualStudio.QualityTools.WebTestFramework (in Microsoft.VisualStudio.QualityTools.WebTestFramework.dll)
Syntax
'Declaration
<ConditionalRuleTypeAttribute(ConditionalRuleType.AnyConditional)> _
Public MustInherit Class ConditionalRule
[ConditionalRuleTypeAttribute(ConditionalRuleType.AnyConditional)]
public abstract class ConditionalRule
[ConditionalRuleTypeAttribute(ConditionalRuleType::AnyConditional)]
public ref class ConditionalRule abstract
[<AbstractClass>]
[<ConditionalRuleTypeAttribute(ConditionalRuleType.AnyConditional)>]
type ConditionalRule =  class end
public abstract class ConditionalRule
The ConditionalRule type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| .gif) | ConditionalRule | Initializes a new instance of the ConditionalRule class. | 
Top
Methods
| Name | Description | |
|---|---|---|
| .gif) | CheckCondition | Determines whether the condition was met. | 
| .gif) | CleanUp | Called after the loop or condition has finished executing. This includes any requests in the body. Any cleanup code that is relevant to the conditional rule must be added to this method. | 
| .gif) | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | 
| .gif) | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | 
| .gif) | GetHashCode | Serves as the default hash function. (Inherited from Object.) | 
| .gif) | GetType | Gets the Type of the current instance. (Inherited from Object.) | 
| .gif) | Initialize | Called before the first CheckCondition call is made. Any initialization code that is relevant to the conditional rule should be added to this method. | 
| .gif) | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | 
| .gif) | StringRepresentation | Converts the rule to a string to be displayed in the tree. | 
| .gif) | ToString | Returns a string that represents the current object. (Inherited from Object.) | 
Top
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also
Reference
Microsoft.VisualStudio.TestTools.WebTesting Namespace
Inheritance Hierarchy
Object
  Microsoft.VisualStudio.TestTools.WebTesting.ConditionalRule
    Microsoft.VisualStudio.TestTools.WebTesting.Rules.ContextParameterExistenceRule
    Microsoft.VisualStudio.TestTools.WebTesting.Rules.CookieComparisonRule
    Microsoft.VisualStudio.TestTools.WebTesting.Rules.CookieExistenceRule
    Microsoft.VisualStudio.TestTools.WebTesting.Rules.CountingLoopRule
    Microsoft.VisualStudio.TestTools.WebTesting.Rules.ForLoopRule
    Microsoft.VisualStudio.TestTools.WebTesting.Rules.LastRequestOutcomeRule
    Microsoft.VisualStudio.TestTools.WebTesting.Rules.LastResponseCodeRule
    Microsoft.VisualStudio.TestTools.WebTesting.Rules.NumericalComparisonRule
    Microsoft.VisualStudio.TestTools.WebTesting.Rules.ProbabilityRule
    Microsoft.VisualStudio.TestTools.WebTesting.Rules.StringComparisonRule