ExecutableBaseTest
public abstract class ExecutableBaseTest
extends Object
implements IRemoteTest , IRuntimeHintProvider , ITestCollector , IShardableTest , IAbiReceiver , ITestFilterReceiver , IDiscoverDependencies
java.lang.Object | |
↳ | com.android.tradefed.testtype.binary.ExecutableBaseTest |
テストの実行可能なスタイルの基本クラス。例: バイナリ、シェル スクリプト。
まとめ
田畑 | |
---|---|
public static final String | NO_BINARY_ERROR
|
パブリック コンストラクター | |
---|---|
ExecutableBaseTest () |
公開メソッド | |
---|---|
void | addAllExcludeFilters ( filters) addAllExcludeFilters ( filters) 除外するテストのフィルターの |
void | addAllIncludeFilters ( filters) addAllIncludeFilters ( filters) 含めるテストのフィルターの |
void | addExcludeFilter (String filter) 除外するテストのフィルターを追加します。 |
void | addIncludeFilter (String filter) 含めるテストのフィルターを追加します。 |
void | clearExcludeFilters () 現在追跡されているすべての除外フィルターを削除します。 |
void | clearIncludeFilters () 現在追跡されているすべての包含フィルターを削除します。 |
abstract String | findBinary (String binary) バイナリを検索して実行できるようにします。 |
IAbi | getAbi () |
getExcludeFilters () 除外フィルターの現在の | |
getIncludeFilters () インクルード フィルターの現在の | |
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 も提供する |
保護されたメソッド | |
---|---|
long | getTimeoutPerBinaryMs () |
田畑
NO_BINARY_ERROR
public static final String NO_BINARY_ERROR
パブリック コンストラクター
ExecutableBaseTest
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 |
clearExcludeFilters
public void clearExcludeFilters ()
現在追跡されているすべての除外フィルターを削除します。
clearIncludeFilters
public void clearIncludeFilters ()
現在追跡されているすべての包含フィルターを削除します。
findBinary
public abstract String findBinary (String binary)
バイナリを検索して実行できるようにします。
パラメーター | |
---|---|
binary | String : バイナリのパスまたは単にバイナリ名。 |
戻り値 | |
---|---|
String | バイナリへのパス、または見つからない場合は null。 |
スロー | |
---|---|
DeviceNotAvailableException |
getRuntimeHint
public final long getRuntimeHint ()
テストの予想実行時間をミリ秒単位で返します。この時間は、シャード実行の負荷分散に使用されます
戻り値 | |
---|---|
long |
レポートの依存関係
publicreportDependencies ()
戻り値 | |
---|---|
走る
public void run (TestInformation testInfo, ITestInvocationListener listener)
テストを実行し、結果をリスナーに報告します。
パラメーター | |
---|---|
testInfo | TestInformation : テストを実行するための有用な情報を含むTestInformation オブジェクト。 |
listener | ITestInvocationListener : テスト結果のITestInvocationListener |
スロー | |
---|---|
DeviceNotAvailableException |
runBinary
public abstract void runBinary (String binaryPath, ITestInvocationListener listener, TestDescription description)
指定されたパスでバイナリを実際に実行します。
パラメーター | |
---|---|
binaryPath | String : バイナリのパス。 |
listener | ITestInvocationListener : 結果を報告するリスナー。 |
description | TestDescription : 進行中のテスト。 |
スロー | |
---|---|
DeviceNotAvailableException |
setCollectTestsOnly
public final void setCollectTestsOnly (boolean shouldCollectTest)
テスト収集モードを有効または無効にします
スプリット
public finalsplit (int shardHint)
実行しようとする shardCount も提供するsplit()
の代替バージョン。これは、時々任意に決定できないテスト ランナーに役立ちます。
パラメーター | |
---|---|
shardHint | int : 試行されたシャード数。 |
戻り値 | |
---|---|
個別に実行されるサブテストのコレクション、またはテストが現在シャード可能でない場合はnull |
保護されたメソッド
getTimeoutPerBinaryMs
protected long getTimeoutPerBinaryMs ()
戻り値 | |
---|---|
long | 実行のために各バイナリに適用されるタイムアウト。 |