IMultiTargetPreparer

public interface IMultiTargetPreparer
implements IDisableable

com.android.tradefed.targetprep.multi.IMultiTargetPreparer


同时为多部设备准备测试环境。仅用于需要多台设备的设置,否则请在每台设备上使用常规的 ITargetPreparer

请注意,您可以在一个配置中指定多个 IMultiTargetPreparer。建议每个 IMultiTargetPreparer 清楚地记录其预期的环境预设置和设置后状态。

摘要

公共方法

default void setUp(IInvocationContext context)

此方法已废弃。 请改用 setUp(TestInformation)

default void setUp(TestInformation testInformation)

执行测试所需的目标设置。

default void tearDown(TestInformation testInformation, Throwable e)

在测试后执行目标清理/拆解。

default void tearDown(IInvocationContext context, Throwable e)

此方法已废弃。 请改用 tearDown(TestInformation,Throwable)

公共方法

setUp

public void setUp (IInvocationContext context)

此方法已废弃。
请改用 setUp(TestInformation)

执行测试所需的目标设置。

参数
context IInvocationContext:描述调用、设备、build 的 IInvocationContext

抛出
DeviceNotAvailableException 如果设备无响应
BuildError 如果出现与 build 相关的错误
TargetSetupError 如果设置环境时发生严重错误

setUp

public void setUp (TestInformation testInformation)

执行测试所需的目标设置。

参数
testInformation TestInformation:描述调用、设备、build 的 TestInformation

抛出
DeviceNotAvailableException 如果设备无响应
BuildError 如果出现与 build 相关的错误
TargetSetupError 如果设置环境时发生严重错误

tearDown

public void tearDown (TestInformation testInformation, 
                Throwable e)

在测试后执行目标清理/拆解。

参数
testInformation TestInformation:描述调用、设备、build 的 TestInformation

e Throwable:如果调用因异常而结束,则此属性将是调用级别捕获的异常。否则,将为 null

抛出
DeviceNotAvailableException 如果设备无响应

tearDown

public void tearDown (IInvocationContext context, 
                Throwable e)

此方法已废弃。
请改用 tearDown(TestInformation,Throwable)

在测试后执行目标清理/拆解。

参数
context IInvocationContext:描述调用、设备、build 的 IInvocationContext

e Throwable:如果调用因异常而结束,则此属性将是调用级别捕获的异常。否则,将为 null

抛出
DeviceNotAvailableException 如果设备无响应