InstalledInstrumentationsTest
public class InstalledInstrumentationsTest
extends Object
implements IDeviceTest , IShardableTest , IMetricCollectorReceiver , IAutoRetriableTest , IConfigurationReceiver
java.lang.Object | |
↳ | com.android.tradefed.testtype.InstalledInstrumentationsTest |
現在のデバイスで見つかったすべてのインストルメンテーションを実行します。
まとめ
パブリック コンストラクター | |
---|---|
InstalledInstrumentationsTest () |
公開メソッド | |
---|---|
ITestDevice | getDevice () テスト対象のデバイスを取得します。 |
void | run ( TestInformation testInfo, ITestInvocationListener listener) テストを実行し、結果をリスナーに報告します。 |
void | setConfiguration ( IConfiguration configuration) 使用中の |
void | setDevice ( ITestDevice device) テスト対象のデバイスを注入します。 |
void | setMetricCollectors ( collectors) setMetricCollectors ( collectors) テスト実行用に定義された |
boolean | shouldRetry (int attemptJustExecuted, previousResults) shouldRetry (int attemptJustExecuted, previousResults) |
split (int shardCountHint) 実行しようとする shardCount も提供する |
パブリック コンストラクター
InstalledInstrumentationsTest
public InstalledInstrumentationsTest ()
公開メソッド
走る
public void run (TestInformation testInfo, ITestInvocationListener listener)
テストを実行し、結果をリスナーに報告します。
パラメーター | |
---|---|
testInfo | TestInformation : テストを実行するための有用な情報を含むTestInformation オブジェクト。 |
listener | ITestInvocationListener : テスト結果のITestInvocationListener |
スロー | |
---|---|
DeviceNotAvailableException |
setConfiguration
public void setConfiguration (IConfiguration configuration)
使用中のIConfiguration
を挿入します。
パラメーター | |
---|---|
configuration | IConfiguration |
setDevice
public void setDevice (ITestDevice device)
テスト対象のデバイスを注入します。
パラメーター | |
---|---|
device | ITestDevice : 使用するITestDevice |
setMetricCollectors
public void setMetricCollectors (collectors)
テスト実行用に定義されたIMetricCollector
のリストを設定します。
パラメーター | |
---|---|
collectors |
再試行する必要があります
public boolean shouldRetry (int attemptJustExecuted,previousResults)
ERROR(IRetryDecision#shouldRetry(IRemoteTest, int, List)/com.android.tradefed.retry.IRetryDecision#shouldRetry(com.android.tradefed.testtype.IRemoteTest,int,List) IRetryDecision#shouldRetry(IRemoteTest, int, List))
.再試行するかどうかを決定します。また、再試行するIRemoteTest
に必要な変更を加えます (フィルターの適用、次の実行の準備など)。
パラメーター | |
---|---|
attemptJustExecuted | int : 実行した試行の数。 |
previousResults | TestRunResult のリスト。 |
戻り値 | |
---|---|
boolean | 再試行する必要がある場合は True、それ以外の場合は False。 |
スロー | |
---|---|
DeviceNotAvailableException |
スプリット
publicsplit (int shardCountHint)
実行しようとする shardCount も提供するsplit()
の代替バージョン。これは、時々任意に決定できないテスト ランナーに役立ちます。
パラメーター | |
---|---|
shardCountHint | int : 試行されたシャード数。 |
戻り値 | |
---|---|
個別に実行されるサブテストのコレクション、またはテストが現在シャード可能でない場合はnull |