ITest调用

public interface ITestInvocation

com.android.tradefed.invoker.ITestInvocation


处理一个 TradeFederation 测试调用。

概括

嵌套类

class ITestInvocation.ExitInformation

表示调用的一些退出信息。

公共方法

default ITestInvocation.ExitInformation getExitInfo ()

给定调用的退出信息。

abstract void invoke ( IInvocationContext metadata, IConfiguration config, IRescheduler rescheduler, ITestInvocationListener... extraListeners)

执行测试调用。

default void notifyInvocationForceStopped (String message, ErrorIdentifier errorId)

通知TestInvocation已请求 TradeFed 停止。

default void notifyInvocationStopped (String message)

通知TestInvocation TradeFed 最终将关闭。

公共方法

获取退出信息

public ITestInvocation.ExitInformation getExitInfo ()

给定调用的退出信息。

退货
ITestInvocation.ExitInformation

调用

public abstract void invoke (IInvocationContext metadata, 
                IConfiguration config, 
                IRescheduler rescheduler, 
                ITestInvocationListener... extraListeners)

执行测试调用。

参数
metadata IInvocationContext :执行测试的IInvocationContext

config IConfiguration :本次测试运行的IConfiguration

rescheduler IReschedulerIRescheduler ,用于重新安排调用的一部分以在另一个资源上执行

extraListeners ITestInvocationListener :要通知的ITestInvocationListener s,除了config中的那些

投掷
DeviceNotAvailableException如果与设备的通信丢失
可抛

通知调用强制停止

public void notifyInvocationForceStopped (String message, 
                ErrorIdentifier errorId)

通知TestInvocation已请求 TradeFed 停止。

参数
message String :与停止调用关联的消息

errorId ErrorIdentifier :与强制停止关联的标识符

通知调用停止

public void notifyInvocationStopped (String message)

通知TestInvocation TradeFed 最终将关闭。

参数
message String :与停止调用关联的消息