UITestInterpreter 类

 

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

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

继承层次结构

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

语法

public class UITestInterpreter : UITestInterpreterCore
public ref class UITestInterpreter : UITestInterpreterCore
type UITestInterpreter = 
    class
        inherit UITestInterpreterCore
    end
Public Class UITestInterpreter
    Inherits UITestInterpreterCore

构造函数

名称 说明
System_CAPS_pubmethod UITestInterpreter(UITest)

初始化 UITestInterpreter 类的新实例。

属性

名称 说明
System_CAPS_pubproperty ActionInvoker

获取或设置用于解释此测试的 UITestActionInvoker。(替代 UITestInterpreterCore.ActionInvoker。)

System_CAPS_protproperty CurrentAction

当前正执行的操作。(从 UITestInterpreterCore 继承。)

System_CAPS_protproperty PlaybackInProgress

进度,则播放中,则为 true。(从 UITestInterpreterCore 继承。)

System_CAPS_pubproperty PlaybackUITest

获取正在执行的 UI 测试。(从 UITestInterpreterCore 继承。)

方法

名称 说明
System_CAPS_pubmethod Cancel()

取消当前步骤或测试的解释。(替代 UITestInterpreterCore.Cancel()。)

System_CAPS_pubmethod Dispose()

处置此对象。(从 UITestInterpreterCore 继承。)

System_CAPS_protmethod Dispose(Boolean)

(可选)释放资源。(替代 UITestInterpreterCore.Dispose(Boolean)。)

System_CAPS_pubmethod Equals(Object)

(从 Object 继承。)

System_CAPS_protmethod ExecuteAction(UITestAction, UIMap)

执行特定操作。操作包含该操作的 UIObject 的 ID。此 ID 用于获取对象的 queryid,从而传递给输入操作的对象调用方法。

调用方法还需要 UITestActionInvoker 接口类型的对象。在这种情况下为默认实现 UITestActionInvoker 的 UITestPlayback 类型。(替代 UITestInterpreterCore.ExecuteAction(UITestAction, UIMap)。)

System_CAPS_pubmethod ExecuteStep()

执行 (也就是说解释) 在当前选择的 ActionList 的当前阶跃。(从 UITestInterpreterCore 继承。)

System_CAPS_pubmethod ExecuteTest()

执行 (也就是说解释) 当前 UITest 对象。(从 UITestInterpreterCore 继承。)

System_CAPS_pubmethod ExecuteTest(Int64, Int64)

执行 (即) 解释操作的当前 UITest 对象中指定的范围。(从 UITestInterpreterCore 继承。)

System_CAPS_pubmethodSystem_CAPS_static ExecuteTest(UITest)

执行给定测试。

System_CAPS_pubmethodSystem_CAPS_static ExecuteTest(UITest, Int64, Int64)

对指定范围的操作执行给定测试。

System_CAPS_protmethod Finalize()

(从 Object 继承。)

System_CAPS_pubmethod GetHashCode()

(从 Object 继承。)

System_CAPS_pubmethod GetType()

(从 Object 继承。)

System_CAPS_pubmethod HighlightElement()

突出显示与当前操作关联的 UI 元素。

System_CAPS_protmethod IsExpectedExceptionFromActionExecution(Exception)

如果给定异常从操作执行中是预期的则返回 true。(替代 UITestInterpreterCore.IsExpectedExceptionFromActionExecution(Exception)。)

System_CAPS_protmethod LogActionExecutionException(Exception)

记录 SQM 数据进行播放异常。(替代 UITestInterpreterCore.LogActionExecutionException(Exception)。)

System_CAPS_protmethod MemberwiseClone()

(从 Object 继承。)

System_CAPS_pubmethod MoveToFirstStep()

将当前操作指针移动至当前所选操作列表中的第一个操作。(从 UITestInterpreterCore 继承。)

System_CAPS_pubmethod MoveToLastStep()

将当前操作指针移动至当前所选操作列表中的最后一个操作。(从 UITestInterpreterCore 继承。)

System_CAPS_pubmethod MoveToNextStep()

将操作指针移动至当前所选操作列表中的下一个操作。(从 UITestInterpreterCore 继承。)

System_CAPS_pubmethod MoveToPreviousStep()

将操作指针移动至当前所选操作列表中的上一个操作。(从 UITestInterpreterCore 继承。)

System_CAPS_pubmethod MoveToStepNumber(Int32)

将当前操作指针移动至当前所选操作列表中给定操作索引处。(从 UITestInterpreterCore 继承。)

System_CAPS_protmethod OnErrorHandledByUser(UITestErrorEventArgs)

在用户处理该操作执行错误后调用。

这可以用于跟踪类似的日志。(替代 UITestInterpreterCore.OnErrorHandledByUser(UITestErrorEventArgs)。)

System_CAPS_protmethod RaisePlaybackProgressEvent(UITestProgressEventArgs)

引发播放进度事件。(从 UITestInterpreterCore 继承。)

System_CAPS_pubmethod RaiseWaitForThinkTimeEvent(UITestAction, Int32)

引发 E:Microsoft.VisualStudio.TestTools.UITest.CodeGeneration.UITestInterpreter.InterpreterProgress 事件。

System_CAPS_pubmethod ToString()

(从 Object 继承。)

System_CAPS_pubmethod Unhighlight()

移除与当前操作关联的 UI 元素的突出显示。

事件

名称 说明
System_CAPS_pubevent ActionCompleted

执行 UITestAction 后引发事件。(从 UITestInterpreterCore 继承。)

System_CAPS_pubevent ActionListCompleted

每个 ActionList 执行完后引发事件。(从 UITestInterpreterCore 继承。)

System_CAPS_pubevent ActionListStarted

在每个 ActionList 之前执行引发的事件启动。(从 UITestInterpreterCore 继承。)

System_CAPS_pubevent ActionStarted

UITestAction 执行前引发事件。(从 UITestInterpreterCore 继承。)

System_CAPS_pubevent InterpreterError

解读 UITest 时出现错误的事件引发。(从 UITestInterpreterCore 继承。)

System_CAPS_pubevent InterpreterProgress

解读 UITest 时更新进度的事件引发。(从 UITestInterpreterCore 继承。)

System_CAPS_pubevent InterpreterWarning

解读 UITest 时出现警告的事件引发。(从 UITestInterpreterCore 继承。)

System_CAPS_pubevent UITestCompleted

UItest 执行完后引发事件。(从 UITestInterpreterCore 继承。)

System_CAPS_pubevent UITestStarted

在 UITest 开始之前执行引发的事件。(从 UITestInterpreterCore 继承。)

线程安全

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

请参阅

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

返回页首