UITestInterpreter 类

执行用户界面 (UI) 测试中的每个测试操作,并使用 ActionInvoker 属性的值解释每个操作的结果。

继承层次结构

Object
  Microsoft.VisualStudio.TestTools.UITest.CodeGeneration.UITestInterpreterCore
    Microsoft.VisualStudio.TestTools.UITest.CodeGeneration.UITestInterpreter

命名空间:  Microsoft.VisualStudio.TestTools.UITest.CodeGeneration
程序集:  Microsoft.VisualStudio.TestTools.UITest.CodeGeneration(在 Microsoft.VisualStudio.TestTools.UITest.CodeGeneration.dll 中)

语法

声明
Public Class UITestInterpreter _
    Inherits UITestInterpreterCore
public class UITestInterpreter : UITestInterpreterCore
public ref class UITestInterpreter : public UITestInterpreterCore
type UITestInterpreter =  
    class 
        inherit UITestInterpreterCore 
    end
public class UITestInterpreter extends UITestInterpreterCore

UITestInterpreter 类型公开以下成员。

构造函数

  名称 说明
公共方法 UITestInterpreter 初始化 UITestInterpreter 类的新实例。

页首

属性

  名称 说明
公共属性 ActionInvoker 获取或设置用于解释此测试的 UITestActionInvoker。 (重写 UITestInterpreterCore.ActionInvoker。)
受保护的属性 CurrentAction 当前正执行的操作。 (继承自 UITestInterpreterCore。)
受保护的属性 PlaybackInProgress 进度,则播放中,则为 true。 (继承自 UITestInterpreterCore。)
公共属性 PlaybackUITest 获取正在执行的 UI 测试。 (继承自 UITestInterpreterCore。)

页首

方法

  名称 说明
公共方法 Cancel 取消当前步骤或测试的解释。 (重写 UITestInterpreterCore.Cancel()。)
公共方法 Dispose() 处置此对象。 (继承自 UITestInterpreterCore。)
受保护的方法 Dispose(Boolean) (可选)释放资源。 (重写 UITestInterpreterCore.Dispose(Boolean)。)
公共方法 Equals 确定指定的对象是否等于当前对象。 (继承自 Object。)
受保护的方法 ExecuteAction 执行特定操作。操作包含该操作的 UIObject 的 ID。此 ID 用于获取对象的 queryid,从而传递给输入操作的对象调用方法。调用方法还需要 UITestActionInvoker 接口类型的对象。在这种情况下为默认实现 UITestActionInvoker 的 UITestPlayback 类型。 (重写 UITestInterpreterCore.ExecuteAction(UITestAction, UIMap)。)
公共方法 ExecuteStep 执行 (也就是说解释) 在当前选择的 ActionList 的当前阶跃。 (继承自 UITestInterpreterCore。)
公共方法 ExecuteTest() 执行 (也就是说解释) 当前 UITest 对象。 (继承自 UITestInterpreterCore。)
公共方法静态成员 ExecuteTest(UITest) 执行给定测试。
公共方法 ExecuteTest(Int64, Int64) 执行 (即) 解释操作的当前 UITest 对象中指定的范围。 (继承自 UITestInterpreterCore。)
公共方法静态成员 ExecuteTest(UITest, Int64, Int64) 对指定范围的操作执行给定测试。
受保护的方法 Finalize 在垃圾回收将某一对象回收前允许该对象尝试释放资源并执行其他清理操作。 (继承自 Object。)
公共方法 GetHashCode 作为默认哈希函数。 (继承自 Object。)
公共方法 GetType 获取当前实例的 Type。 (继承自 Object。)
公共方法 HighlightElement 突出显示与当前操作关联的 UI 元素。
受保护的方法 IsExpectedExceptionFromActionExecution 如果给定异常从操作执行中是预期的则返回 true。 (重写 UITestInterpreterCore.IsExpectedExceptionFromActionExecution(Exception)。)
受保护的方法 LogActionExecutionException 记录 SQM 数据进行播放异常。 (重写 UITestInterpreterCore.LogActionExecutionException(Exception)。)
受保护的方法 MemberwiseClone 创建当前 Object 的浅表副本。 (继承自 Object。)
公共方法 MoveToFirstStep 将当前操作指针移动至当前所选操作列表中的第一个操作。 (继承自 UITestInterpreterCore。)
公共方法 MoveToLastStep 将当前操作指针移动至当前所选操作列表中的最后一个操作。 (继承自 UITestInterpreterCore。)
公共方法 MoveToNextStep 将操作指针移动至当前所选操作列表中的下一个操作。 (继承自 UITestInterpreterCore。)
公共方法 MoveToPreviousStep 将操作指针移动至当前所选操作列表中的上一个操作。 (继承自 UITestInterpreterCore。)
公共方法 MoveToStepNumber 将当前操作指针移动至当前所选操作列表中给定操作索引处。 (继承自 UITestInterpreterCore。)
受保护的方法 OnErrorHandledByUser 在用户处理该操作执行错误后调用。 这可以用于跟踪类似的日志。 (重写 UITestInterpreterCore.OnErrorHandledByUser(UITestErrorEventArgs)。)
受保护的方法 RaisePlaybackProgressEvent 引发播放进度事件。 (继承自 UITestInterpreterCore。)
公共方法 RaiseWaitForThinkTimeEvent 引发 InterpreterProgress 事件。
公共方法 ToString 返回表示当前对象的字符串。 (继承自 Object。)
公共方法 Unhighlight 移除与当前操作关联的 UI 元素的突出显示。

页首

事件

  名称 说明
公共事件 ActionCompleted 执行 UITestAction 后引发事件。 (继承自 UITestInterpreterCore。)
公共事件 ActionListCompleted 每个 ActionList 执行完后引发事件。 (继承自 UITestInterpreterCore。)
公共事件 ActionListStarted 在每个 ActionList 之前执行引发的事件启动。 (继承自 UITestInterpreterCore。)
公共事件 ActionStarted UITestAction 执行前引发事件。 (继承自 UITestInterpreterCore。)
公共事件 InterpreterError 解读 UITest 时出现错误的事件引发。 (继承自 UITestInterpreterCore。)
公共事件 InterpreterProgress 解读 UITest 时更新进度的事件引发。 (继承自 UITestInterpreterCore。)
公共事件 InterpreterWarning 解读 UITest 时出现警告的事件引发。 (继承自 UITestInterpreterCore。)
公共事件 UITestCompleted UItest 执行完后引发事件。 (继承自 UITestInterpreterCore。)
公共事件 UITestStarted 在 UITest 开始之前执行引发的事件。 (继承自 UITestInterpreterCore。)

页首

线程安全

此类型的任何公共 static(在 Visual Basic 中为 Shared) 成员都是线程安全的。但不保证所有实例成员都是线程安全的。

请参阅

参考

Microsoft.VisualStudio.TestTools.UITest.CodeGeneration 命名空间

ActionLogInvoker