DeclarativeWebTest 类
表示基于 XML 的声明性 Web 性能测试。
继承层次结构
System.Object
Microsoft.VisualStudio.TestTools.WebTesting.WebTest
Microsoft.VisualStudio.TestTools.WebTesting.DeclarativeWebTest
命名空间: Microsoft.VisualStudio.TestTools.WebTesting
程序集: Microsoft.VisualStudio.QualityTools.WebTestFramework(在 Microsoft.VisualStudio.QualityTools.WebTestFramework.dll 中)
语法
声明
<SerializableAttribute> _
Public Class DeclarativeWebTest _
Inherits WebTest _
Implements ICloneable
[SerializableAttribute]
public class DeclarativeWebTest : WebTest,
ICloneable
[SerializableAttribute]
public ref class DeclarativeWebTest : public WebTest,
ICloneable
[<SerializableAttribute>]
type DeclarativeWebTest =
class
inherit WebTest
interface ICloneable
end
public class DeclarativeWebTest extends WebTest implements ICloneable
DeclarativeWebTest 类型公开以下成员。
构造函数
名称 | 说明 | |
---|---|---|
DeclarativeWebTest | 初始化 DeclarativeWebTest 类的新实例。 |
页首
属性
名称 | 说明 | |
---|---|---|
ConditionalRuleReferences | 获取条件规则引用的集合。 | |
Context | 获取或设置一个对象,该对象包含 Web 性能测试在运行时可用的上下文变量。 (继承自 WebTest。) | |
ContextParameters | 获取与此 Web 性能测试关联的上下文参数的集合。 | |
DataSources | 获取为此 Web 性能测试定义的数据源的集合。 (继承自 WebTest。) | |
Description | 获取或设置此 Web 性能测试的文字说明。 | |
Guid | 获取或设置 GUID,用于唯一标识 WebTest 中的每个实例。 (继承自 WebTest。) | |
InheritFromWebTest | 当此 Web 性能测试包含在另一 Web 性能测试中并继承父 Web 测试的属性时,获取父 Web 性能测试的 WebTest 对象。 (继承自 WebTest。) | |
Items | 获取或设置包含在此 Web 性能测试中的项集合。这些项包括事务、请求、注释和包含的 Web 性能测试。 | |
LastRequestOutcome | (继承自 WebTest。) | |
LastResponse | 获取在该 Web 性能测试中为顶级请求接收的上一次响应。 (继承自 WebTest。) | |
Name | 获取测试用例的名称。 (继承自 WebTest。) | |
Outcome | 获取或设置 Web 性能测试求的“通过”或“未通过”结果。 (继承自 WebTest。) | |
Password | 获取和设置用于身份验证的密码。 (继承自 WebTest。) | |
PreAuthenticate | 获取或设置一个值,该值指示是否对 Web 性能测试内的所有请求进行预身份验证。 (继承自 WebTest。) | |
Proxy | 获取或设置一个值,该值表示 Web 性能测试要使用的代理服务器。 (继承自 WebTest。) | |
RequestBodyCaptureLimit | 获取或设置用于捕获请求数据的限制(以字节为单位)。 (继承自 WebTest。) | |
RequestItems | 获取该测试实例中所有需求项的集合。 | |
ResponseBodyCaptureLimit | 获取或设置用于捕获响应数据的限制(以字节为单位)。 (继承自 WebTest。) | |
StopOnError | 获取或设置是否应在出错时停止运行测试的指示。 (继承自 WebTest。) | |
UserName | 获取和设置用于身份验证的用户名。 (继承自 WebTest。) | |
ValidationRuleReferences | 获取对 Web 性能测试级验证规则的引用集合。 (继承自 WebTest。) | |
WebProxy | 获取或设置该 Web 性能测试要使用的 Web 代理。 (继承自 WebTest。) | |
WebTestPluginReferences | 获取对 Web 性能测试插件的引用集合。 (继承自 WebTest。) |
页首
方法
页首
事件
名称 | 说明 | |
---|---|---|
PostPage | (继承自 WebTest。) | |
PostRequest | 在该 Web 性能测试运行的每一个请求后发生。 (继承自 WebTest。) | |
PostTransaction | (继承自 WebTest。) | |
PostWebTest | 在 Web 性能测试运行之后发生。 (继承自 WebTest。) | |
PrePage | (继承自 WebTest。) | |
PreRequest | 在该 Web 性能测试运行的每一个请求前发生。 (继承自 WebTest。) | |
PreRequestDataBinding | (继承自 WebTest。) | |
PreTransaction | (继承自 WebTest。) | |
PreWebTest | 在 Web 性能测试运行之前发生。 (继承自 WebTest。) | |
ValidateResponse | 在对 Web 性能测试请求的响应已收到并且已准备好进行验证时发生。 (继承自 WebTest。) | |
ValidateResponseOnPageComplete | (继承自 WebTest。) |
页首
备注
不要将 DeclarativeWebTest 类用作基类。
线程安全
此类型的任何公共 static(在 Visual Basic 中为 Shared) 成员都是线程安全的。但不保证所有实例成员都是线程安全的。