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 IInvocationContextIInvocationContext,說明叫用、裝置、建構作業。

擲回
DeviceNotAvailableException 如果裝置沒有回應
BuildError 如果發生建構相關錯誤
TargetSetupError 如果設定環境時發生嚴重錯誤

setUp

public void setUp (TestInformation testInformation)

設定測試目標。

參數
testInformation TestInformationTestInformation,說明叫用、裝置、建構。

擲回
DeviceNotAvailableException 如果裝置沒有回應
BuildError 如果發生建構相關錯誤
TargetSetupError 如果設定環境時發生嚴重錯誤

tearDown

public void tearDown (TestInformation testInformation, 
                Throwable e)

測試完成後,請清除/拆除目標。

參數
testInformation TestInformationTestInformation,說明叫用、裝置、建構。

e Throwable:如果呼叫以例外狀況結束,這會是在呼叫層級擷取的例外狀況。否則為 null

擲回
DeviceNotAvailableException 如果裝置沒有回應

tearDown

public void tearDown (IInvocationContext context, 
                Throwable e)

這個方法已淘汰。
請改用 tearDown(TestInformation,Throwable)

測試完成後,請清除/拆除目標。

參數
context IInvocationContextIInvocationContext,說明叫用、裝置、建構作業。

e Throwable:如果呼叫以例外狀況結束,這會是在呼叫層級擷取的例外狀況。否則為 null

擲回
DeviceNotAvailableException 如果裝置沒有回應