インストール済みの機器テスト
public class InstalledInstrumentationsTest
extends Object
implements IDeviceTest , IShardableTest , IMetricCollectorReceiver , IAutoRetriableTest , IConfigurationReceiver
java.lang.オブジェクト | |
↳ | 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, skipList) shouldRetry (int attemptJustExecuted, previousResults, skipList) shouldRetry (int attemptJustExecuted, previousResults, skipList) |
split (int shardCountHint) 実行しようとしている shardCount も提供する、 |
パブリックコンストラクター
インストール済みの機器テスト
public InstalledInstrumentationsTest ()
パブリックメソッド
走る
public void run (TestInformation testInfo, ITestInvocationListener listener)
テストを実行し、結果をリスナーに報告します。
パラメーター | |
---|---|
testInfo | TestInformation : テストを実行するために役立つ情報を含むTestInformation オブジェクト。 |
listener | ITestInvocationListener : テスト結果のITestInvocationListener |
投げる | |
---|---|
DeviceNotAvailableException |
set構成
public void setConfiguration (IConfiguration configuration)
使用中のIConfiguration
を挿入します。
パラメーター | |
---|---|
configuration | IConfiguration |
セットデバイス
public void setDevice (ITestDevice device)
テスト対象のデバイスを注入します。
パラメーター | |
---|---|
device | ITestDevice : 使用するITestDevice |
setMetricCollectors
public void setMetricCollectors (collectors)
テスト実行用に定義されたIMetricCollector
のリストを設定します。
パラメーター | |
---|---|
collectors |
再試行する必要があります
public boolean shouldRetry (int attemptJustExecuted,previousResults, skipList)
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 のリスト。 |
skipList |
戻り値 | |
---|---|
boolean | 再試行する必要がある場合は True、それ以外の場合は False。 |
投げる | |
---|---|
DeviceNotAvailableException |
スプリット
publicsplit (int shardCountHint)
実行しようとしている shardCount も提供する、 split()
の代替バージョン。これは、独断で決定できない場合があるテスト ランナーにとって便利です。
パラメーター | |
---|---|
shardCountHint | int : 試行されたシャード数。 |
戻り値 | |
---|---|
個別に実行されるサブテストのコレクション、またはテストが現在シャード可能でない場合はnull |