IMultiTargetPreparer
public interface IMultiTargetPreparer
implements IDisableable
com.android.tradefed.targetprep.multi.IMultiTargetPreparer |
一起为多个设备准备测试环境。仅用于需要多个设备的设置,否则在每个设备上使用常规ITargetPreparer
。
请注意,可以在配置中指定多个IMultiTargetPreparer
。建议每个IMultiTargetPreparer清楚地记录其预期的安装前和安装后环境。
概括
公开方法 | |
---|---|
default void | setUp (IInvocationContext context) 不建议使用此方法。请改用 |
default void | setUp (TestInformation testInformation) 执行目标设置以进行测试。 |
default void | tearDown (TestInformation testInformation, Throwable e) 测试后执行目标清理/拆卸。 |
default void | tearDown (IInvocationContext context, Throwable e) 不建议使用此方法。请改用 |
公开方法
设置
public void setUp (IInvocationContext context)
不建议使用此方法。
请改用setUp(com.android.tradefed.invoker.TestInformation)
。
执行目标设置以进行测试。
参数 | |
---|---|
context | IInvocationContext :描述调用,设备和构建的IInvocationContext 。 |
投掷 | |
---|---|
TargetSetupError | 如果在设置环境时发生致命错误 |
BuildError | 如果发生与构建相关的错误 |
DeviceNotAvailableException | 如果设备无响应 |
设置
public void setUp (TestInformation testInformation)
执行目标设置以进行测试。
参数 | |
---|---|
testInformation | TestInformation :描述调用,设备和构建的TestInformation 。 |
投掷 | |
---|---|
TargetSetupError | 如果在设置环境时发生致命错误 |
BuildError | 如果发生与构建相关的错误 |
DeviceNotAvailableException | 如果设备无响应 |
拆除
public void tearDown (TestInformation testInformation, Throwable e)
测试后执行目标清理/拆卸。
参数 | |
---|---|
testInformation | TestInformation :描述调用,设备和构建的TestInformation 。 |
e | Throwable :如果调用以异常结束,则这将是在调用级别捕获的异常。否则,将为null 。 |
投掷 | |
---|---|
DeviceNotAvailableException | 如果设备无响应 |
拆除
public void tearDown (IInvocationContext context, Throwable e)
不建议使用此方法。
请改用tearDown(com.android.tradefed.invoker.TestInformation, Throwable)
。
测试后执行目标清理/拆卸。
参数 | |
---|---|
context | IInvocationContext :描述调用,设备和构建的IInvocationContext 。 |
e | Throwable :如果调用以异常结束,则这将是在调用级别捕获的异常。否则,将为null 。 |
投掷 | |
---|---|
DeviceNotAvailableException | 如果设备无响应 |