InstalledInstrumentationsTest

public class InstalledInstrumentationsTest
extends Object implements IAutoRetriableTest, IConfigurationReceiver, IDeviceTest, IMetricCollectorReceiver, IShardableTest

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)

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

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)) から委任されました。

split(int shardCountHint)

split() の代替バージョン。実行が試行される shardCount も指定します。

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

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

shouldRetry

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

分割

public  split (int shardCountHint)

split() の代替バージョン。実行が試行される shardCount も提供します。これは、場合によっては任意に決定できない一部のテストランナーに便利です。

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

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