DeviceTestRunOptions
public class DeviceTestRunOptions
extends Object
java.lang.Object | |
↳ | com.android.tradefed.testtype.junit4.DeviceTestRunOptions |
BaseHostJUnit4Test によるデバイス テストの実行に関連するオプションのビルダー クラス。
まとめ
パブリック コンストラクター | |
---|---|
DeviceTestRunOptions (String packageName) |
公開メソッド | |
---|---|
DeviceTestRunOptions | addExtraListener ( ITestLifeCycleReceiver listener) 実行中のインストルメンテーションにリスナーを追加します。 |
DeviceTestRunOptions | addInstrumentationArg (String key, String value) インストルメンテーションに渡される引数を追加します。 |
void | clearExtraListeners () |
void | clearInstrumentationArgs () 以前に |
String | getApkFileName () apk インストール用の apk ファイルの名前を返します。 |
ITestDevice | getDevice () |
getExtraListeners () | |
String[] | getInstallArgs () インストール コマンドの追加オプションを返します。 |
getInstrumentationArgs () | |
Long | getMaxInstrumentationTimeoutMs () |
Long | getMaxTimeToOutputMs () |
String | getPackageName () |
String | getRunner () |
String | getTestClassName () |
String | getTestMethodName () |
Long | getTestTimeoutMs () |
Integer | getUserId () |
boolean | isForceQueryable () インストールする apk をクエリ可能にするかどうか。 |
boolean | isGrantPermission () apk インストールの権限を付与するかどうか。 |
boolean | isHiddenApiCheckDisabled () |
boolean | isIsolatedStorageDisabled () |
boolean | isRestartDisabled () |
boolean | isTestApiCheckDisabled () |
boolean | isWindowAnimationDisabled () |
DeviceTestRunOptions | setApkFileName (String apkFileName) apk インストール用の apk ファイルの名前を設定します。 |
DeviceTestRunOptions | setCheckResults (boolean checkResults) インストルメンテーションの実行結果をチェックして、エラーが発生していないことを確認するかどうかを設定します。 |
DeviceTestRunOptions | setDevice ( ITestDevice device) |
DeviceTestRunOptions | setDisableHiddenApiCheck (boolean disableHiddenApiCheck) ホスト側から使用する「am instrument」に --no-hidden-api-checks を追加するかどうかを設定します。 |
DeviceTestRunOptions | setDisableIsolatedStorage (boolean disableIsolatedStorage) ホスト側から使用する「am instrument」に --no-isolated-storage を追加するかどうかを設定します。 |
DeviceTestRunOptions | setDisableRestart (boolean disableRestart) ホスト側から使用する「am instrument」に --no-restart を追加するかどうかを設定します。 |
DeviceTestRunOptions | setDisableTestApiCheck (boolean disableTestApiCheck) ホスト側から使用する「am instrument」に --no-test-api-access を追加するかどうかを設定します。 |
DeviceTestRunOptions | setDisableWindowAnimation (boolean disableWindowAnimation) ホスト側から使用する「am instrument」に --no-window-animation を追加するかどうかを設定します。 |
DeviceTestRunOptions | setForceQueryable (boolean forceQueryable) インストールする apk がクエリ可能であってはならない場合は、 |
DeviceTestRunOptions | setGrantPermission (boolean grantPermission) apk インストールのアクセス許可を付与します。 |
DeviceTestRunOptions | setInstallArgs (String... installArgs) インストール コマンドの追加オプションを設定します。 |
DeviceTestRunOptions | setMaxInstrumentationTimeoutMs (Long maxInstrumentationTimeoutMs) 完全なインストルメンテーションを実行して完了する必要がある最大時間 (ミリ秒単位) を設定します。 |
DeviceTestRunOptions | setMaxTimeToOutputMs (Long maxTimeToOutputMs) インストルメンテーションが停止する前に出力を停止できる最大時間 (ミリ秒単位) を設定します。 |
DeviceTestRunOptions | setRunner (String runner) インストルメンテーションの実行に使用するインストルメンテーション ランナーを設定します。 |
DeviceTestRunOptions | setTestClassName (String testClassName) インストルメンテーションを実行するクラス名を設定します。 |
DeviceTestRunOptions | setTestMethodName (String testMethodName) インストルメンテーションを実行するメソッド名を設定します。 |
DeviceTestRunOptions | setTestTimeoutMs (Long testTimeoutMs) テストが中断されるまでに実行できる最大時間 (ミリ秒単位) を設定します。 |
DeviceTestRunOptions | setUserId (Integer userId) インストルメンテーションを実行するユーザー ID を設定します。 |
boolean | shouldCheckResults () |
パブリック コンストラクター
DeviceTestRunOptions
public DeviceTestRunOptions (String packageName)
パラメーター | |
---|---|
packageName | String |
公開メソッド
addExtraListener
public DeviceTestRunOptions addExtraListener (ITestLifeCycleReceiver listener)
実行中のインストルメンテーションにリスナーを追加します。
パラメーター | |
---|---|
listener | ITestLifeCycleReceiver |
戻り値 | |
---|---|
DeviceTestRunOptions |
addInstrumentationArg
public DeviceTestRunOptions addInstrumentationArg (String key, String value)
インストルメンテーションに渡される引数を追加します。
パラメーター | |
---|---|
key | String |
value | String |
戻り値 | |
---|---|
DeviceTestRunOptions |
clearExtraListeners
public void clearExtraListeners ()
clearInstrumentationArgs
public void clearInstrumentationArgs ()
以前にaddInstrumentationArg(String, String)
で設定されたインストルメンテーション引数をすべてクリアします。
getApkFileName
public String getApkFileName ()
apk インストール用の apk ファイルの名前を返します。
戻り値 | |
---|---|
String |
getExtraListeners
publicgetExtraListeners ()
戻り値 | |
---|---|
getInstallArgs
public String[] getInstallArgs ()
インストール コマンドの追加オプションを返します。
戻り値 | |
---|---|
String[] |
getInstrumentationArgs
publicgetInstrumentationArgs ()
戻り値 | |
---|---|
getMaxInstrumentationTimeoutMs
public Long getMaxInstrumentationTimeoutMs ()
戻り値 | |
---|---|
Long |
getMaxTimeToOutputMs
public Long getMaxTimeToOutputMs ()
戻り値 | |
---|---|
Long |
getPackageName
public String getPackageName ()
戻り値 | |
---|---|
String |
getRunner
public String getRunner ()
戻り値 | |
---|---|
String |
getTestClassName
public String getTestClassName ()
戻り値 | |
---|---|
String |
getTestMethodName
public String getTestMethodName ()
戻り値 | |
---|---|
String |
getTestTimeoutMs
public Long getTestTimeoutMs ()
戻り値 | |
---|---|
Long |
getUserId
public Integer getUserId ()
戻り値 | |
---|---|
Integer |
isForceQueryable
public boolean isForceQueryable ()
インストールする apk をクエリ可能にするかどうか。デフォルト値は true です。
戻り値 | |
---|---|
boolean |
isGrantPermission
public boolean isGrantPermission ()
apk インストールの権限を付与するかどうか。
戻り値 | |
---|---|
boolean |
isHiddenApiCheckDisabled
public boolean isHiddenApiCheckDisabled ()
戻り値 | |
---|---|
boolean |
isIsolatedStorageDisabled
public boolean isIsolatedStorageDisabled ()
戻り値 | |
---|---|
boolean |
isRestartDisabled
public boolean isRestartDisabled ()
戻り値 | |
---|---|
boolean |
isTestApiCheckDisabled
public boolean isTestApiCheckDisabled ()
戻り値 | |
---|---|
boolean |
isWindowAnimationDisabled
public boolean isWindowAnimationDisabled ()
戻り値 | |
---|---|
boolean |
setApkFileName
public DeviceTestRunOptions setApkFileName (String apkFileName)
apk インストール用の apk ファイルの名前を設定します。
パラメーター | |
---|---|
apkFileName | String |
戻り値 | |
---|---|
DeviceTestRunOptions |
setCheckResults
public DeviceTestRunOptions setCheckResults (boolean checkResults)
インストルメンテーションの実行結果をチェックして、エラーが発生していないことを確認するかどうかを設定します。
パラメーター | |
---|---|
checkResults | boolean |
戻り値 | |
---|---|
DeviceTestRunOptions |
setDevice
public DeviceTestRunOptions setDevice (ITestDevice device)
パラメーター | |
---|---|
device | ITestDevice |
戻り値 | |
---|---|
DeviceTestRunOptions |
setDisableHiddenApiCheck
public DeviceTestRunOptions setDisableHiddenApiCheck (boolean disableHiddenApiCheck)
ホスト側から使用する「am instrument」に --no-hidden-api-checks を追加するかどうかを設定します。
パラメーター | |
---|---|
disableHiddenApiCheck | boolean |
戻り値 | |
---|---|
DeviceTestRunOptions |
setDisableIsolatedStorage
public DeviceTestRunOptions setDisableIsolatedStorage (boolean disableIsolatedStorage)
ホスト側から使用する「am instrument」に --no-isolated-storage を追加するかどうかを設定します。
パラメーター | |
---|---|
disableIsolatedStorage | boolean |
戻り値 | |
---|---|
DeviceTestRunOptions |
setDisableRestart
public DeviceTestRunOptions setDisableRestart (boolean disableRestart)
ホスト側から使用する「am instrument」に --no-restart を追加するかどうかを設定します。
パラメーター | |
---|---|
disableRestart | boolean |
戻り値 | |
---|---|
DeviceTestRunOptions |
setDisableTestApiCheck
public DeviceTestRunOptions setDisableTestApiCheck (boolean disableTestApiCheck)
ホスト側から使用する「am instrument」に --no-test-api-access を追加するかどうかを設定します。
パラメーター | |
---|---|
disableTestApiCheck | boolean |
戻り値 | |
---|---|
DeviceTestRunOptions |
setDisableWindowAnimation
public DeviceTestRunOptions setDisableWindowAnimation (boolean disableWindowAnimation)
ホスト側から使用する「am instrument」に --no-window-animation を追加するかどうかを設定します。
パラメーター | |
---|---|
disableWindowAnimation | boolean |
戻り値 | |
---|---|
DeviceTestRunOptions |
setForceQueryable
public DeviceTestRunOptions setForceQueryable (boolean forceQueryable)
インストールする apk がクエリ可能であってはならない場合は、 false
を設定します。
パラメーター | |
---|---|
forceQueryable | boolean |
戻り値 | |
---|---|
DeviceTestRunOptions |
setGrantPermission
public DeviceTestRunOptions setGrantPermission (boolean grantPermission)
apk インストールのアクセス許可を付与します。
パラメーター | |
---|---|
grantPermission | boolean |
戻り値 | |
---|---|
DeviceTestRunOptions |
setInstallArgs
public DeviceTestRunOptions setInstallArgs (String... installArgs)
インストール コマンドの追加オプションを設定します。
パラメーター | |
---|---|
installArgs | String |
戻り値 | |
---|---|
DeviceTestRunOptions |
setMaxInstrumentationTimeoutMs
public DeviceTestRunOptions setMaxInstrumentationTimeoutMs (Long maxInstrumentationTimeoutMs)
完全なインストルメンテーションを実行して完了する必要がある最大時間 (ミリ秒単位) を設定します。タイムアウトなしの場合は 0 に設定します。オプション。
パラメーター | |
---|---|
maxInstrumentationTimeoutMs | Long |
戻り値 | |
---|---|
DeviceTestRunOptions |
setMaxTimeToOutputMs
public DeviceTestRunOptions setMaxTimeToOutputMs (Long maxTimeToOutputMs)
インストルメンテーションが停止する前に出力を停止できる最大時間 (ミリ秒単位) を設定します。タイムアウトなしの場合は 0 に設定します。オプション。
パラメーター | |
---|---|
maxTimeToOutputMs | Long |
戻り値 | |
---|---|
DeviceTestRunOptions |
setRunner
public DeviceTestRunOptions setRunner (String runner)
インストルメンテーションの実行に使用するインストルメンテーション ランナーを設定します。デフォルトのランナーは「android.support.test.runner.AndroidJUnitRunner」です。オプション。
パラメーター | |
---|---|
runner | String |
戻り値 | |
---|---|
DeviceTestRunOptions |
setTestClassName
public DeviceTestRunOptions setTestClassName (String testClassName)
インストルメンテーションを実行するクラス名を設定します。インストルメンテーションは、クラスのみを実行するようにフィルター処理されます。 setTestMethodName(String)
で使用できます。オプション。
パラメーター | |
---|---|
testClassName | String |
戻り値 | |
---|---|
DeviceTestRunOptions |
setTestMethodName
public DeviceTestRunOptions setTestMethodName (String testMethodName)
インストルメンテーションを実行するメソッド名を設定します。正しく機能させるには、 setTestClassName(String)
を設定する必要があります。オプション。
パラメーター | |
---|---|
testMethodName | String |
戻り値 | |
---|---|
DeviceTestRunOptions |
setTestTimeoutMs
public DeviceTestRunOptions setTestTimeoutMs (Long testTimeoutMs)
テストが中断されるまでに実行できる最大時間 (ミリ秒単位) を設定します。タイムアウトなしの場合は 0 に設定します。オプション。
パラメーター | |
---|---|
testTimeoutMs | Long |
戻り値 | |
---|---|
DeviceTestRunOptions |
setUserId
public DeviceTestRunOptions setUserId (Integer userId)
インストルメンテーションを実行するユーザー ID を設定します。オプション。
パラメーター | |
---|---|
userId | Integer |
戻り値 | |
---|---|
DeviceTestRunOptions |
shouldCheckResults
public boolean shouldCheckResults ()
戻り値 | |
---|---|
boolean |