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)

使用中のIConfigurationを挿入します。

void setDevice ( ITestDevice device)

テスト対象のデバイスを注入します。

void setMetricCollectors ( collectors) setMetricCollectors ( collectors)

テスト実行用に定義されたIMetricCollectorのリストを設定します。

boolean shouldRetry (int attemptJustExecuted, previousResults) 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)) .

split (int shardCountHint)

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

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

InstalledInstrumentationsTest

public InstalledInstrumentationsTest ()

公開メソッド

getDevice

public ITestDevice getDevice ()

テスト対象のデバイスを取得します。

戻り値
ITestDevice ITestDevice

走る

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

スプリット

public  split (int shardCountHint)

実行しようとする shardCount も提供するsplit()の代替バージョン。これは、時々任意に決定できないテスト ランナーに役立ちます。

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

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