Microsoft.VisualStudio.TestTools.WebTesting Namespace

The Microsoft.VisualStudio.TestTools.WebTesting namespace supplies classes that enable Web testing. This namespace includes the WebTest class which is the base class for all Web tests. The WebTestRequest and WebTestResponse classes simulate the HTTP requests and responses of the Web pages under test. These classes use the FormPostHttpBody class to simulate the use of form post parameters. Microsoft.VisualStudio.TestTools.WebTesting also includes classes for data binding, test rules, identifying work items, query strings, HTTP context, and plug-ins that provide testing features.

Classes

  Class Description
Public class Comment Represents a comment that the test designer adds to a Web test.
Public class ConnectionFailedWebTestException An exception that is thrown by the test engine for connection failure errors during a Web test.
Public class ContextParameter
Public class ContextParameterCollection
Public class CssIterationAttribute Represents the project iteration to which this test corresponds. This class cannot be inherited.
Public class CssProjectStructureAttribute Represents the node in the team project hierarchy to which this test corresponds.
Public class DataBindingAttribute Contains information that defines data binding properties for a Web test. This class cannot be inherited.
Public class DataSource Defines a data source for a Web test.
Public class DataSourceAttribute Contains information that describes a data source for a Web test. This class cannot be inherited.
Public class DataSourceCollection
Public class DataSourceTable An object that represents a table in a data source that you can use in a Web test.
Public class DataSourceTableCollection
Public class DeclarativeWebTest Represents a declarative, XML-based Web test.
Public class DeclarativeWebTestSerializer Loads the contents of a .webtest file into an instance of the DeclarativeWebTest class.
Public class DeploymentItemAttribute Used to specify deployment items such as a file or directory for per-test-deployment. This class cannot be inherited.
Public class ExtractionEventArgs Provides data for the ExtractValues event.
Public class ExtractionRule Base class used to define rules for obtaining data from a Web response that is generated by a Web test.
Public class ExtractionRuleReference
Public class ExtractionRuleReferenceCollection
Public class FileUploadParameter Represents a file upload form post parameter.
Public class FormPostHttpBody Represents an HTML form post body with a collection of form parameters.
Public class FormPostParameter Represents an HTML form POST parameter.
Public class FormPostParameterCollection Represents a strongly typed container for form post parameters.
Public class HtmlAttribute Represents an HTML attribute.
Public class HtmlAttributeWithOffsets Extends the basic HtmlAttribute and tracks the beginning and ending offsets within an HTML document.
Public class HtmlDocument Provides access to the set of HTML tags in an HTML response body.
Public class HtmlTag The HtmlTag object is the foundation of the HTML document and holds the parsed structure of the document.
Public class HtmlTagWithOffsets Extends the basic HtmlTag by tracking the beginning and ending tag offsets within the HTML document.
Public class IncludeCodedWebTestAttribute Contains information that defines a coded Web test that is included in another Web test.
Public class IncludeDeclarativeWebTestAttribute Contains information that defines a coded Web test that is included in another Web test.
Public class IncludedWebTest Represents a Web test that is included in another Web test.
Public class OwnerAttribute Used to specify the person responsible for maintaining, running, and/or debugging the test. This class cannot be inherited.
Public class Parameter Represents an HTTP parameter base class.
Public class PluginOrRuleProperty A parameter provided to an extraction rule, validation rule, or plug-in.
Public class PostPageEventArgs
Public class PostRequestEventArgs Provides data for the WebTestRequest.PostRequest and WebTest.PostRequest events.
Public class PostTransactionEventArgs
Public class PostWebTestEventArgs Provides data for the PostWebTest event.
Public class PrePageEventArgs
Public class PreRequestEventArgs Provides data for the WebTest.PreRequest event.
Public class PreTransactionEventArgs
Public class PreWebTestEventArgs Provides data for the PreWebTest event.
Public class PriorityAttribute Used to specify the priority of a unit test. This class cannot be inherited.
Public class PropertyCollection Represents a strongly typed container for Web test rule properties.
Public class QueryStringParameter Represents an HTTP querystring parameter.
Public class QueryStringParameterCollection Represents a strongly typed container for query string parameters.
Public class StringHttpBody Represents an HTTP body in string form used for SOAP support.
Public class TestDescriptionAttribute Used to specify the description of the test. This class cannot be inherited.
Public class ThreadedWebTest Represents a base class for a coded Web test that uses a single thread per Web test iteration.
Public class TimeoutAttribute Use this attribute to specify the time-out period of a Web test.
Public class TransactionTimer
Public class ValidationEventArgs Provides data for the ValidateResponse event.
Public class ValidationRule Verifies that requests return valid HTTP responses and that the contents of the response match the expected results. This class must be inherited.
Public class ValidationRuleReference
Public class ValidationRuleReferenceCollection Represents a serializable, strongly typed container for Web test validation rules.
Public class WebTest Base class for all Web tests. Coded Web tests that are written in C# derive directly from this class.
Public class WebTestBaseCollection<T>
Public class WebTestContext Represents the context available to a WebTest.
Public class WebTestEmptyTableException Represents a WebTestEndOfDataException.
Public class WebTestEndOfDataException The exception that is thrown when data binding is being performed on a table with the UniqueDataBindingAccessMethod when there are no more rows of data in the table.
Public class WebTestException The exception that is thrown by the test engine for errors that occur while a test is running.
Public class WebTestItem Base class for WebTestRequest.
Public class WebTestItemCollection Represents a strongly typed container for Web test items.
Public class WebTestPageStatistics Contains statistics regarding the execution of the page.
Public class WebTestPlugin Provides a means to run code and access a WebTest before and after the Web test is run. This class must be inherited.
Public class WebTestPluginReference
Public class WebTestPluginReferenceCollection Represents a serializable strongly typed container for Web test plug-in references.
Public class WebTestRequest Represents an HTTP request that will be sent to a Web server.
Public class WebTestRequestCollection A serializable, strongly typed container for Web test request headers.
Public class WebTestRequestHeader Represents an HTTP header.
Public class WebTestRequestHeaderCollection A serializable strongly typed container for Web test request headers.
Public class WebTestRequestPlugin Receives notifications before and after a request is processed.
Public class WebTestRequestPluginConverter
Public class WebTestRequestPluginReference
Public class WebTestRequestPluginReferenceCollection Represents a strongly typed container for Web test request plug-in references.
Public class WebTestRequestStatistics Used to track key information that is gathered when the request is run.
Public class WebTestResponse Represents an HTTP response.
Public class WebTestRuleBase
Public class WorkItemAttribute Use this attribute to specify a work item that is associated with a test.

Interfaces

  Interface Description
Public interface IHttpBody Provides a common interface for accessing an HTTP body.

Enumerations

  Enumeration Description
Public enumeration DataBindingAccessMethod Enumeration for the access method that is used for data binding.
Public enumeration Outcome
Public enumeration ValidationLevel Used to identify the importance of a validation rule that is run in a load test.
Public enumeration WebTestExecutionInstruction Used to denote how to handle an operation.

See Also

Reference

Other Resources

Understanding Web Tests

Creating a Web Test

Editing a Web Test

Running and Viewing a Web Test

How to: Run a Web Test from the Command Line

How to: Create a Coded Web Test

Walkthrough: Recording and Running a Web Test

Walkthrough: Creating a Coded Web Test

Advanced Web Test Tasks