ModuleDefinition
public class ModuleDefinition
extends Object
implements ITestCollector
java.lang.Object | |
↳ | com.android.tradefed.testtype.suite.ModuleDefinition |
テスト実行構成のコンテナー。このクラスは、テストを準備して実行するためのヘルパーです。
概要
田畑 | |
---|---|
public static final String | MODULE_ABI |
public static final String | MODULE_CONTROLLER |
public static final String | MODULE_ID モジュールIDtestRunStart中にモジュールを一意に識別するために使用される名前。 |
public static final String | MODULE_ISOLATED モジュールが新しく準備されたデバイスで実行されていた場合、このプロパティはtrueに設定されます。 |
public static final String | MODULE_NAME モジュール名は、モジュールに関連付けられたベース名であり、通常、モジュールのロード元のXmlTF構成ファイルから取得されます。 |
public static final String | MODULE_PARAMETERIZATION |
public static final String | PREPARATION_TIME |
public static final String | RETRY_FAIL_COUNT |
public static final String | RETRY_SUCCESS_COUNT |
public static final String | RETRY_TIME |
public static final String | TEAR_DOWN_TIME |
public static final String | TEST_TIME
|
パブリックコンストラクター | |
---|---|
ModuleDefinition (String name, tests, preparersPerDevice, multiPreparers, IConfiguration moduleConfig) ModuleDefinition (String name, tests, preparersPerDevice, multiPreparers, IConfiguration moduleConfig) ModuleDefinition (String name, tests, preparersPerDevice, multiPreparers, IConfiguration moduleConfig) ModuleDefinition (String name, tests, preparersPerDevice, multiPreparers, IConfiguration moduleConfig) コンストラクタ | |
ModuleDefinition (String name, tests, preparersPerDevice, suitePreparersPerDevice, multiPreparers, IConfiguration moduleConfig) ModuleDefinition (String name, tests, preparersPerDevice, suitePreparersPerDevice, multiPreparers, IConfiguration moduleConfig) ModuleDefinition (String name, tests, preparersPerDevice, suitePreparersPerDevice, multiPreparers, IConfiguration moduleConfig) ModuleDefinition (String name, tests, preparersPerDevice, suitePreparersPerDevice, multiPreparers, IConfiguration moduleConfig) ModuleDefinition (String name, tests, preparersPerDevice, suitePreparersPerDevice, multiPreparers, IConfiguration moduleConfig) コンストラクタ |
パブリックメソッド | |
---|---|
int | compareTo ( ModuleDefinition moduleDef) |
String | getId () 一意のモジュール名を返します。 |
IInvocationContext | getModuleInvocationContext () 返し |
getRequiredTokens () | |
long | getRuntimeHint () モジュール内のすべてのテストを実行するためのおおよその時間を返します。 |
boolean | hasModuleFailed () モジュールでtestRunFailureが呼び出された場合はTrueを返します* |
int | numTests () 現在の数を返します |
final void | reportNotExecuted (ITestInvocationListener listener, String message) 完全に実行されていないモジュールを報告します。 |
final void | run (TestInformation moduleInfo, ITestInvocationListener listener, moduleLevelListeners, TestFailureListener failureListener) run (TestInformation moduleInfo, ITestInvocationListener listener, moduleLevelListeners, TestFailureListener failureListener) すべての実行 |
final void | run (TestInformation moduleInfo, ITestInvocationListener listener) すべての実行 |
final void | run (TestInformation moduleInfo, ITestInvocationListener listener, moduleLevelListeners, TestFailureListener failureListener, int maxRunLimit) run (TestInformation moduleInfo, ITestInvocationListener listener, moduleLevelListeners, TestFailureListener failureListener, int maxRunLimit) すべての実行 |
Throwable | runPreparation (boolean includeSuitePreparers) 指定されている場合はスイートレベルの作成者を含む、テストの作成者を実行します。 |
void | setBuild (IBuildInfo build) 注入し |
void | setCollectTestsOnly (boolean collectTestsOnly) テスト収集モードを有効または無効にします |
void | setDevice (ITestDevice device) 注入し |
void | setEnableDynamicDownload (boolean enableDynamicDownload) モジュールレベルで動的ダウンロードを有効にするかどうか。 |
void | setLogSaver (ILogSaver logSaver) 呼び出しログセーバーをモジュールに渡して、必要に応じて使用できるようにします。 |
final void | setMergeAttemps (boolean mergeAttempts) 結果をマージするかどうかを設定します。 |
void | setMetricCollectors ( collectors) setMetricCollectors ( collectors) 一覧注入 |
final void | setRetryDecision ( IRetryDecision decision) セット |
String | toString () |
void | transferSuiteLevelOptions ( IConfiguration mSuiteConfiguration) スイートレベルの構成のいくつかをコピーします |
保護されたメソッド | |
---|---|
boolean | hasTests () 戻り真のモジュールは、まだ持っている場合 |
田畑
MODULE_ABI
public static final String MODULE_ABI
MODULE_CONTROLLER
public static final String MODULE_CONTROLLER
MODULE_ID
public static final String MODULE_ID
モジュールIDtestRunStart中にモジュールを一意に識別するために使用される名前。通常、MODULE_ABI + MODULE_NAMEの組み合わせになります。
MODULE_ISOLATED
public static final String MODULE_ISOLATED
モジュールが新しく準備されたデバイスで実行されていた場合、このプロパティはtrueに設定されます。
MODULE_NAME
public static final String MODULE_NAME
モジュール名は、モジュールに関連付けられたベース名であり、通常、モジュールのロード元のXmlTF構成ファイルから取得されます。
MODULE_PARAMETERIZATION
public static final String MODULE_PARAMETERIZATION
準備時間
public static final String PREPARATION_TIME
RETRY_FAIL_COUNT
public static final String RETRY_FAIL_COUNT
RETRY_SUCCESS_COUNT
public static final String RETRY_SUCCESS_COUNT
RETRY_TIME
public static final String RETRY_TIME
TEAR_DOWN_TIME
public static final String TEAR_DOWN_TIME
TEST_TIME
public static final String TEST_TIME
パブリックコンストラクター
ModuleDefinition
public ModuleDefinition (String name,tests, preparersPerDevice, multiPreparers, IConfiguration moduleConfig)
コンストラクタ
パラメーター | |
---|---|
name | String :テスト構成の一意の名前。 |
tests | IRemoteTest 実行する必要があります。 |
preparersPerDevice | ITargetPreparer 設定のデバイスに使用されます。 |
multiPreparers | |
moduleConfig | IConfiguration : IConfiguration 基本となるモジュールの設定の。 |
ModuleDefinition
public ModuleDefinition (String name,tests, preparersPerDevice, suitePreparersPerDevice, multiPreparers, IConfiguration moduleConfig)
コンストラクタ
パラメーター | |
---|---|
name | String :テスト構成の一意の名前。 |
tests | IRemoteTest 実行する必要があります。 |
preparersPerDevice | ITargetPreparer 設定のデバイスに使用されます。 |
suitePreparersPerDevice | |
multiPreparers | |
moduleConfig | IConfiguration : IConfiguration 基本となるモジュールの設定の。 |
パブリックメソッド
getId
public String getId ()
一意のモジュール名を返します。
戻り値 | |
---|---|
String |
getModuleInvocationContext
public IInvocationContext getModuleInvocationContext ()
返しIInvocationContext
モジュールに関連付けられているが。
戻り値 | |
---|---|
IInvocationContext |
getRequiredTokens
publicgetRequiredTokens ()
戻り値 | |
---|---|
getRuntimeHint
public long getRuntimeHint ()
モジュール内のすべてのテストを実行するためのおおよその時間を返します。
戻り値 | |
---|---|
long |
hasModuleFailed
public boolean hasModuleFailed ()
モジュールでtestRunFailureが呼び出された場合はTrueを返します*
戻り値 | |
---|---|
boolean |
reportNotExecuted
public final void reportNotExecuted (ITestInvocationListener listener, String message)
完全に実行されていないモジュールを報告します。
パラメーター | |
---|---|
listener | ITestInvocationListener |
message | String |
走る
public final void run (TestInformation moduleInfo, ITestInvocationListener listener,moduleLevelListeners, TestFailureListener failureListener)
すべての実行IRemoteTest
モジュールに含まれているとセットアップに前と後のすべての作成者を使用し、デバイスを清掃してください。
パラメーター | |
---|---|
moduleInfo | TestInformation |
listener | ITestInvocationListener : ITestInvocationListener 結果を報告します。 |
moduleLevelListeners | |
failureListener | TestFailureListener :testFailの収集ログへの特定のリスナー。 nullにすることができます。 |
投げる | |
---|---|
DeviceNotAvailableException | デバイスがオフラインになった場合。 |
走る
public final void run (TestInformation moduleInfo, ITestInvocationListener listener)
すべての実行IRemoteTest
モジュールに含まれているとセットアップに前と後のすべての作成者を使用し、デバイスを清掃してください。
パラメーター | |
---|---|
moduleInfo | TestInformation |
listener | ITestInvocationListener : ITestInvocationListener 結果を報告します。 |
投げる | |
---|---|
DeviceNotAvailableException | デバイスがオフラインになった場合。 |
走る
public final void run (TestInformation moduleInfo, ITestInvocationListener listener,moduleLevelListeners, TestFailureListener failureListener, int maxRunLimit)
すべての実行IRemoteTest
モジュールに含まれているとセットアップに前と後のすべての作成者を使用し、デバイスを清掃してください。
パラメーター | |
---|---|
moduleInfo | TestInformation : TestInformation モジュール用。 |
listener | ITestInvocationListener : ITestInvocationListener 結果を報告します。 |
moduleLevelListeners | |
failureListener | TestFailureListener :testFailの収集ログへの特定のリスナー。 nullにすることができます。 |
maxRunLimit | int :各テストケースについての実行の最大数。 |
投げる | |
---|---|
DeviceNotAvailableException | デバイスがオフラインになった場合。 |
runPreparation
public Throwable runPreparation (boolean includeSuitePreparers)
指定されている場合はスイートレベルの作成者を含む、テストの作成者を実行します。
パラメーター | |
---|---|
includeSuitePreparers | boolean :セットにtrue も実行スイートレベルの作成者に。 |
戻り値 | |
---|---|
Throwable | Throwable 作成者を実行するときに発生したすべての例外の。 |
setCollectTestsOnly
public void setCollectTestsOnly (boolean collectTestsOnly)
テスト収集モードを有効または無効にします
setDevice
public void setDevice (ITestDevice device)
注入しITestDevice
テスト中に使用します。
パラメーター | |
---|---|
device | ITestDevice |
setEnableDynamicDownload
public void setEnableDynamicDownload (boolean enableDynamicDownload)
モジュールレベルで動的ダウンロードを有効にするかどうか。
パラメーター | |
---|---|
enableDynamicDownload | boolean |
setLogSaver
public void setLogSaver (ILogSaver logSaver)
呼び出しログセーバーをモジュールに渡して、必要に応じて使用できるようにします。
パラメーター | |
---|---|
logSaver | ILogSaver |
setMergeAttemps
public final void setMergeAttemps (boolean mergeAttempts)
結果をマージするかどうかを設定します。
パラメーター | |
---|---|
mergeAttempts | boolean |
setMetricCollectors
public void setMetricCollectors (collectors)
一覧注入IMetricCollector
モジュールによって使用されます。
パラメーター | |
---|---|
collectors |
setRetryDecision
public final void setRetryDecision (IRetryDecision decision)
セットIRetryDecision
モジュール内の再試行のために使用されます。
パラメーター | |
---|---|
decision | IRetryDecision |
toString
public String toString ()
戻り値 | |
---|---|
String |
transferSuiteLevelOptions
public void transferSuiteLevelOptions (IConfiguration mSuiteConfiguration)
スイートレベルの構成のいくつかをコピーします
パラメーター | |
---|---|
mSuiteConfiguration | IConfiguration |
保護されたメソッド
hasTests
protected boolean hasTests ()
戻り真のモジュールは、まだ持っている場合IRemoteTest
そのプールで実行します。それ以外の場合はFalse。
戻り値 | |
---|---|
boolean |