UITestInterpreter 类

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

继承层次结构

System.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