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。)

页首

方法

  名称 说明
公共方法 AddCommentToResult 在最近完成的 Web 性能测试请求、事务或所包含的 Web 性能测试之后向 Web 性能测试结果添加注释。 (继承自 WebTest。)
公共方法 AddDataSource(String, String, DataBindingAccessMethod, array<String[]) 将数据源添加到 Web 性能测试所包含的数据集合。 (继承自 WebTest。)
公共方法 AddDataSource(String, String, String, DataBindingAccessMethod, array<String[]) 将数据源添加到 Web 性能测试所包含的数据集合。 (继承自 WebTest。)
公共方法 AddDataSource(String, String, String, DataBindingAccessMethod, DataBindingSelectColumns, array<String[]) (继承自 WebTest。)
公共方法 AddDataSourceBinding 定义绑定关系并将其添加到 Web 性能测试的数据源绑定集合。 (继承自 WebTest。)
公共方法 BeginCondition (继承自 WebTest。)
公共方法 BeginLoop (继承自 WebTest。)
公共方法 BeginTransaction 用给定的名称开始事务计时器。 (继承自 WebTest。)
公共方法 Clone 创建作为当前实例副本的新 DeclarativeWebTest。
公共方法 EndCondition (继承自 WebTest。)
公共方法 EndLoop (继承自 WebTest。)
公共方法 EndTransaction(String) 结束具有指定名称的事务计时器。 (继承自 WebTest。)
公共方法 EndTransaction(String, Boolean) 终止指定事务。 (继承自 WebTest。)
公共方法 Equals 确定指定的对象是否等于当前对象。 (继承自 Object。)
公共方法 ExecuteConditionalRule (继承自 WebTest。)
受保护的方法 Finalize 允许对象在“垃圾回收”回收之前尝试释放资源并执行其他清理操作。 (继承自 Object。)
公共方法 GetDataTableRowCount (继承自 WebTest。)
公共方法 GetEnumerator 获取枚举 Web 性能测试中的项的枚举数。 (继承自 WebTest。)
公共方法 GetExtractionRuleVariables 返回 Web 测试中所有的提取规则变量名称。
公共方法 GetHashCode 用作特定类型的哈希函数。 (继承自 Object。)
公共方法 GetItem 获取指定以从零开始的请求数计数的 WebTestItem。
公共方法 GetRequestEnumerator 获取在时间规则下运行时所有请求的枚举器。 (重写 WebTest.GetRequestEnumerator()。)
公共方法 GetType 获取当前实例的 Type。 (继承自 Object。)
公共方法 IncludeWebTest(String) 从编码的 Web 性能测试中调用编码的 Web 性能测试。 (继承自 WebTest。)
公共方法 IncludeWebTest(WebTest) 从编码的 Web 性能测试中调用编码的 Web 性能测试。 (继承自 WebTest。)
公共方法 IncludeWebTest(String, Boolean) 从编码的 Web 性能测试中调用编码的 Web 性能测试。 (继承自 WebTest。)
公共方法 IncludeWebTest(WebTest, Boolean) 从编码的 Web 性能测试中调用编码的 Web 性能测试。 (继承自 WebTest。)
公共方法 InitializeDataBinding 将特性的数据源和数据绑定信息添加到当前实例。主要用于编码 web 测试。 (重写 WebTest.InitializeDataBinding()。)
公共方法 InsertItemAt 在指定的项索引中插入 WebTestItem。
公共方法 InternalSetOutcome (继承自 WebTest。)
受保护的方法 MemberwiseClone 创建当前 Object 的浅表副本。 (继承自 Object。)
公共方法 MoveDataTableCursor(String, String) 使数据表中的游标前进到下一条记录。 (继承自 WebTest。)
公共方法 MoveDataTableCursor(String, String, Int32) (继承自 WebTest。)
公共方法 RegisterDataSourceInLoop (继承自 WebTest。)
公共方法 ReloadDataTable (继承自 WebTest。)
公共方法 RemoveItemAt 移除指定项索引处的 WebTestItem。
公共方法 Stop 停止当前的 Web 性能测试。 (继承自 WebTest。)
公共方法 ToString 返回表示当前对象的字符串。 (继承自 Object。)

页首

事件

  名称 说明
公共事件 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) 成员都是线程安全的。但不保证所有实例成员都是线程安全的。

请参见

参考

Microsoft.VisualStudio.TestTools.WebTesting 命名空间