ValidationRule Class
Verifies that requests return valid HTTP responses and that the contents of the response match the expected results. This class must be inherited.
Assembly: Microsoft.VisualStudio.QualityTools.WebTestFramework (in Microsoft.VisualStudio.QualityTools.WebTestFramework.dll)
Microsoft.VisualStudio.TestTools.WebTesting::ValidationRule
Microsoft.VisualStudio.TestTools.WebTesting.Rules::SharePointValidationRuleFindText2
Microsoft.VisualStudio.TestTools.WebTesting.Rules::SharePointValidationRuleResponseURL2
Microsoft.VisualStudio.TestTools.WebTesting.Rules::ValidateFormField
Microsoft.VisualStudio.TestTools.WebTesting.Rules::ValidateHtmlSelectTag
Microsoft.VisualStudio.TestTools.WebTesting.Rules::ValidateHtmlTagInnerText
Microsoft.VisualStudio.TestTools.WebTesting.Rules::ValidateResponseUrl
Microsoft.VisualStudio.TestTools.WebTesting.Rules::ValidationRuleFindText
Microsoft.VisualStudio.TestTools.WebTesting.Rules::ValidationRuleRequestTime
Microsoft.VisualStudio.TestTools.WebTesting.Rules::ValidationRuleRequiredAttributeValue
Microsoft.VisualStudio.TestTools.WebTesting.Rules::ValidationRuleRequiredTag
Microsoft.VisualStudio.TestTools.WebTesting.Rules::ValidationRuleResponseTimeGoal
| Name | Description | |
|---|---|---|
![]() | ValidationRule() | This class must be inherited. It cannot be instantiated. |
| Name | Description | |
|---|---|---|
![]() | RuleDescription | Obsolete.Gets the description displayed in the user interface when a rule is selected. |
![]() | RuleName | Obsolete.When overridden in a derived class, gets the name displayed in the user interface when a rule is selected or shown in the editor. |
| Name | Description | |
|---|---|---|
![]() | Equals(Object^) | (Inherited from Object.) |
![]() | Finalize() | (Inherited from Object.) |
![]() | GetHashCode() | (Inherited from Object.) |
![]() | GetType() | (Inherited from Object.) |
![]() | MemberwiseClone() | (Inherited from Object.) |
![]() | ToString() | (Inherited from Object.) |
![]() | Validate(Object^, ValidationEventArgs^) | When overridden in a derived class, this validates both the request and response. |
User-written validation rules must derive from this class. Validation rules are executed just after the request is complete.
Notes to Inheritors:
When you inherit from ValidationRule, you must override the Validate method and RuleName property.
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.


