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(List<IMetricCollector> collectors)

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

boolean shouldRetry(int attemptJustExecuted, List<TestRunResult> previousResults, Set<String> skipList)

IRetryDecision.shouldRetry(IRemoteTest,int,List) から委任されます。

Collection<IRemoteTest> split(int shardCountHint)

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

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

InstalledInstrumentationsTest

public InstalledInstrumentationsTest ()

パブリック メソッド

getDevice

public ITestDevice getDevice ()

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

戻り値
ITestDevice ITestDevice

run

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 (List<IMetricCollector> collectors)

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

パラメータ
collectors List

shouldRetry

public boolean shouldRetry (int attemptJustExecuted, 
                List<TestRunResult> previousResults, 
                Set<String> skipList)

IRetryDecision.shouldRetry(IRemoteTest,int,List) から委任されます。再試行を試みるかどうかを 決定します。また、再試行する IRemoteTest に 必要な変更(フィルタの適用、次の実行の準備など)を行います。

パラメータ
attemptJustExecuted int: 実行したばかりの試行回数。

previousResults List: 実行したばかりのテストの TestRunResult のリスト。

skipList Set: 再試行しないアイテムのセット。

戻り値
boolean 再試行する場合は True、それ以外の場合は False。

例外
DeviceNotAvailableException

split

public Collection<IRemoteTest> split (int shardCountHint)

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

パラメータ
shardCountHint int: 試行された shardCount。

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