実行可能ベーステスト

public abstract class ExecutableBaseTest
extends Object implements IRemoteTest , IRuntimeHintProvider , ITestCollector , IShardableTest , IAbiReceiver , ITestFilterReceiver , IDiscoverDependencies

java.lang.オブジェクト
com.android.tradefed.testtype.binary.ExecutableBaseTest


テストの実行可能スタイルの基本クラス。例: バイナリ、シェル スクリプト。

まとめ

田畑

public static final String NO_BINARY_ERROR

パブリックコンストラクター

ExecutableBaseTest ()

パブリックメソッド

void addAllExcludeFilters ( filters) addAllExcludeFilters ( filters)

テストを除外するフィルターのERROR(/Set)を追加します。

void addAllIncludeFilters ( filters) addAllIncludeFilters ( filters)

テストを含めるフィルターのERROR(/Set)を追加します。

void addExcludeFilter (String filter)

除外するテストのフィルターを追加します。

void addIncludeFilter (String filter)

どのテストを含めるかのフィルターを追加します。

void clearExcludeFilters ()

現在追跡されているすべての除外フィルターを削除します。

void clearIncludeFilters ()

現在追跡されているすべての組み込みフィルターを削除します。

abstract String findBinary (String binary)

バイナリを検索して実行できるようにします。

IAbi getAbi ()

boolean getCollectTestsOnly ()
getExcludeFilters ()

除外フィルターの現在のERROR(/Set)を返します。

getIncludeFilters ()

インクルードフィルターの現在のERROR(/Set)を返します。

final long getRuntimeHint ()

テストの予想実行時間をミリ秒単位で返します。

reportDependencies ()
void run ( TestInformation testInfo, ITestInvocationListener listener)

テストを実行し、結果をリスナーに報告します。

abstract void runBinary (String binaryPath, ITestInvocationListener listener, TestDescription description)

実際に指定されたパスでバイナリを実行します。

final void setAbi ( IAbi abi)

final void setCollectTestsOnly (boolean shouldCollectTest)

テスト収集モードを有効または無効にします。

final split (int shardHint)

実行しようとしている shardCount も提供する、 split()の代替バージョン。

保護されたメソッド

boolean doesRunBinaryGenerateTestResults ()
TestDescription[] getFilterDescriptions ( testCommands) getFilterDescriptions ( testCommands)
String getModuleId ( IInvocationContext context)
long getTimeoutPerBinaryMs ()

田畑

NO_BINARY_ERROR

public static final String NO_BINARY_ERROR

パブリックコンストラクター

実行可能ベーステスト

public ExecutableBaseTest ()

パブリックメソッド

addAllExcludeFilters

public void addAllExcludeFilters ( filters)

テストを除外するフィルターのERROR(/Set)を追加します。

パラメーター
filters

addAllIncludeFilters

public void addAllIncludeFilters ( filters)

テストを含めるフィルターのERROR(/Set)を追加します。

パラメーター
filters

addExcludeFilter

public void addExcludeFilter (String filter)

除外するテストのフィルターを追加します。

パラメーター
filter String

addIncludeFilter

public void addIncludeFilter (String filter)

どのテストを含めるかのフィルターを追加します。

パラメーター
filter String

クリア除外フィルタ

public void clearExcludeFilters ()

現在追跡されているすべての除外フィルターを削除します。

ClearIncludeFilters

public void clearIncludeFilters ()

現在追跡されているすべての組み込みフィルターを削除します。

バイナリを見つける

public abstract String findBinary (String binary)

バイナリを検索して実行できるようにします。

パラメーター
binary String : バイナリのパス、または単にバイナリ名。

戻り値
Stringバイナリへのパス。見つからない場合は null。

投げる
DeviceNotAvailableException

アビを取得

public IAbi getAbi ()

戻り値
IAbi

getCollectTestsOnly

public boolean getCollectTestsOnly ()

戻り値
boolean

getExcludeFilters

public  getExcludeFilters ()

除外フィルターの現在のERROR(/Set)を返します。

戻り値

getIncludeFilters

public  getIncludeFilters ()

インクルードフィルターの現在のERROR(/Set)を返します。

戻り値

ランタイムヒントの取得

public final long getRuntimeHint ()

テストの予想実行時間をミリ秒単位で返します。この時間は、シャード実行の負荷分散に使用されます。

戻り値
long

レポート依存関係

public  reportDependencies ()

戻り値

走る

public void run (TestInformation testInfo, 
                ITestInvocationListener listener)

テストを実行し、結果をリスナーに報告します。

パラメーター
testInfo TestInformation : テストを実行するために役立つ情報を含むTestInformationオブジェクト。

listener ITestInvocationListener : テスト結果のITestInvocationListener

投げる
DeviceNotAvailableException

ランバイナリ

public abstract void runBinary (String binaryPath, 
                ITestInvocationListener listener, 
                TestDescription description)

実際に指定されたパスでバイナリを実行します。

パラメーター
binaryPath String : バイナリのパス。

listener ITestInvocationListener : 結果を報告するリスナー。

description TestDescription : 進行中のテスト。

投げる
DeviceNotAvailableException

セットアビ

public final void setAbi (IAbi abi)

パラメーター
abi IAbi

setCollectTestsOnly

public final void setCollectTestsOnly (boolean shouldCollectTest)

テスト収集モードを有効または無効にします。

スプリット

public final  split (int shardHint)

実行しようとしている shardCount も提供する、 split()の代替バージョン。これは、独断で決定できない場合があるテスト ランナーにとって便利です。

パラメーター
shardHint int : 試行されたシャード数。

戻り値
個別に実行されるサブテストのコレクション、またはテストが現在シャード可能でない場合はnull

保護されたメソッド

doRunBinaryGenerateTestResults

protected boolean doesRunBinaryGenerateTestResults ()

戻り値
boolean

getFilterDescriptions

protected TestDescription[] getFilterDescriptions ( testCommands)

パラメーター
testCommands

戻り値
TestDescription[]

モジュールIDの取得

protected String getModuleId (IInvocationContext context)

パラメーター
context IInvocationContext

戻り値
String

getTimeoutPerBinaryMs

protected long getTimeoutPerBinaryMs ()

戻り値
long各バイナリの実行時に適用されるタイムアウト。