Share via


Microsoft.VisualStudio.TestTools.WebTesting.Rules Namespace

The Microsoft.VisualStudio.TestTools.WebTesting.Rules namespace contains a set of rules used by Web performance tests to test Web pages. These rules provide Web performance tests a set of tools to test the content of Web pages. Additionally, custom rules can be created to extend the functionality of Web performance tests. Rules are identified by two categories: extraction rules and validation rules. Extraction rules find content in Web pages and adds the information to the context which can be passed to future requests. Validation rules test for the existence of content.

Classes

  Class Description
Public class ConditionalRuleTypeAttribute Attribute that represents the conditional rule type attribute. This attribute specifies the conditional rule type for which the conditional rule applies.
Public class ContextParameterExistenceRule Class to contain a condition rule that checks whether a context parameter exists.
Public class CookieComparisonRule Class to contain a conditional rule that checks the value of a cookie.
Public class CookieExistenceRule Class to contain a conditional rule that checks whether a specific cookie exists.
Public class CountingLoopRule Class to contain a conditional rule that is used to execute a loop for a particular number of times.
Public class ExtractAttributeValue Extract the value of an attribute from a specified HTML tag.
Public class ExtractFormField Extracts the value of a form field attribute and adds it to the WebTestContext.
Public class ExtractGuids
Public class ExtractHiddenFields Extracts all hidden fields from the response and adds each value to the context.
Public class ExtractHttpHeader Used to extract an HTTP header value from the response and place the value of the header into the WebTestContext.
Public class ExtractRegularExpression No content here will be updated; please do not add material here.
Public class ExtractText No content here will be updated; please do not add material here.
Public class ForLoopRule Class to contain a conditional rule that represents an iteration statement, an initialization statement, a test expression, and an increment statement.
Public class IsContextParameterNameAttribute Attribute to specify that a property represents a context parameter name.
Public class LastRequestOutcomeRule Class to contain a conditional rule that compares the outcome of the last request. Applies only to condition statements.
Public class LastResponseCodeRule Class to contain a conditional rule that checks the response code of the last response. Applies only to condition statements.
Public class NumericalComparisonRule Class to contain a conditional rule that consists of a numeric comparison.
Public class ProbabilityRule Class to contain a conditional rule that is based on the provided probability.
Public class RuleExecutionOrderAttribute Attribute to specify when a rule should be executed relative to the dependent requests of this rule.
Public class RuleResult Represents a result from the execution of a Web performance test rule.
Public class SharePointExtractFormField2
Public class SharePointExtractGUIDFormField
Public class SharePointExtractListViewWebPartScriptValues
Public class SharePointExtractSelectFormField
Public class SharePointExtractViaKeyString
Public class SharePointFindCalendarDates
Public class SharePointFindCalendarItems
Public class SharePointFindDocumentItems
Public class SharePointFindHrefs
Public class SharePointFindListItems
Public class SharePointFindWorkFlowInstances
Public class SharePointValidationRuleFindText2
Public class SharePointValidationRuleResponseURL2
Public class StringComparisonRule Class to contain a conditional rule that consists of a string comparison.
Public class ValidateFormField Validates the name and value of a form field attribute.
Public class ValidateHtmlSelectTag A validation rule that is used to validate the selected option from an HTML select tag.
Public class ValidateHtmlTagInnerText Validation rule that is used to validate the inner text from an HTML tag.
Public class ValidateResponseUrl No content here will be updated; please do not add material here.
Public class ValidationRuleFindText Validates that the specified text exists or does not exist in the text response.
Public class ValidationRuleRequestTime Validates that the response for a request is returned within the specified period of time.
Public class ValidationRuleRequiredAttributeValue Validates that the HtmlDocument provided by the response contains a tag that includes an attribute that has a specified value.
Public class ValidationRuleRequiredTag Validates the existence of a specified tag in the response.
Public class ValidationRuleResponseTimeGoal Used to check that the response time for a request is less than or equal to the response time goal that is specified in the request properties.

Enumerations

  Enumeration Description
Public enumeration SharePointExtractSelectFormField.SelectionOptionValues

See Also

Reference

ValidationRule

ExtractionRule

Other Resources

Working with Web Tests Overview

[retired] How to: Add a Validation Rule to a Web Performance Test

[retired] How to: Add an Extraction Rule to a Web Performance Test

Coding a custom validation rule for a web performance test

Coding a custom extraction rule for a web performance test