IMultiTargetPreparer

public interface IMultiTargetPreparer
implements IDisableable

com.android.tradefed.targetprep.multi.IMultiTargetPreparer


複数のデバイスのテスト環境をまとめて準備します。複数のデバイスが必要な設定にのみ使用してください。それ以外の場合は、各デバイスで通常の ITargetPreparer を使用してください。

1 つの構成で複数の 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: 呼び出し、デバイス、ビルドを記述する IInvocationContext

例外
DeviceNotAvailableException デバイスが応答しなくなった場合
BuildError ビルド関連のエラーの場合
TargetSetupError 環境の設定中に致命的なエラーが発生した場合

setUp

public void setUp (TestInformation testInformation)

テスト用にターゲットを設定します。

パラメータ
testInformation TestInformation: 呼び出し、デバイス、 ビルドを記述する TestInformation

例外
DeviceNotAvailableException デバイスが応答しなくなった場合
BuildError ビルド関連のエラーの場合
TargetSetupError 環境の設定中に致命的なエラーが発生した場合

tearDown

public void tearDown (TestInformation testInformation, 
                Throwable e)

テスト後にターゲットのクリーンアップ/終了を行います。

パラメータ
testInformation TestInformation: 呼び出し、デバイス、 ビルドを記述する TestInformation

e Throwable: 呼び出しが例外で終了した場合、これは呼び出しレベルでキャッチされた例外になります。それ以外の場合は null になります。

例外
DeviceNotAvailableException デバイスが応答しなくなった場合

tearDown

public void tearDown (IInvocationContext context, 
                Throwable e)

このメソッドは非推奨です。
代わりに tearDown(TestInformation,Throwable) を使用してください。

テスト後にターゲットのクリーンアップ/終了を行います。

パラメータ
context IInvocationContext: 呼び出し、デバイス、ビルドを記述する IInvocationContext

e Throwable: 呼び出しが例外で終了した場合、これは呼び出しレベルでキャッチされた例外になります。それ以外の場合は null になります。

例外
DeviceNotAvailableException デバイスが応答しなくなった場合