Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ValidationRule::Validate Method (Object^, ValidationEventArgs^)

 

When overridden in a derived class, this validates both the request and response.

Namespace:   Microsoft.VisualStudio.TestTools.WebTesting
Assembly:  Microsoft.VisualStudio.QualityTools.WebTestFramework (in Microsoft.VisualStudio.QualityTools.WebTestFramework.dll)

public:
virtual void Validate(
	Object^ sender,
	ValidationEventArgs^ e
) abstract

Parameters

sender
Type: System::Object^

The source of the event.

e
Type: Microsoft.VisualStudio.TestTools.WebTesting::ValidationEventArgs^

A ValidationEventArgs that contains the event data.

Validate is called with the test case context and transaction context. These allow the rule to examine both the request and the response and make sure that the data matches the required values.

Legacy Code Example

The following example validates whether the Web page contains any client script.

No code example is currently available or this language may not be supported.
Return to top
Show: