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()
install コマンドの追加オプションを返します。 |
|
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 インストルメント」に --no-hidden-api-checks を追加するかどうかを設定します。 |
DeviceTestRunOptions
|
setDisableIsolatedStorage(boolean disableIsolatedStorage)
ホスト側で使用される「am インストルメント」に --no-isolated-storage を追加するかどうかを設定します。 |
DeviceTestRunOptions
|
setDisableRestart(boolean disableRestart)
ホスト側から使用される「am インストルメント」に --no-restart を追加するかどうかを設定します。 |
DeviceTestRunOptions
|
setDisableTestApiCheck(boolean disableTestApiCheck)
ホスト側で使用される「am インストルメント」に --no-test-api-access を追加するかどうかを設定します。 |
DeviceTestRunOptions
|
setDisableWindowAnimation(boolean disableWindowAnimation)
ホスト側で使用される「am インストルメント」に --no-window-animation を追加するかどうかを設定します。 |
DeviceTestRunOptions
|
setForceQueryable(boolean forceQueryable)
インストールする APK をクエリできない場合は、 |
DeviceTestRunOptions
|
setGrantPermission(boolean grantPermission)
apk インストールの権限を付与します。 |
DeviceTestRunOptions
|
setInstallArgs(String... installArgs)
install コマンドの追加オプションを設定します。 |
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 ()
install コマンドの追加オプションを返します。
| 戻り値 | |
|---|---|
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 インストルメント」に --no-hidden-api-checks を追加するかどうかを設定します。
| パラメータ | |
|---|---|
disableHiddenApiCheck |
boolean |
| 戻り値 | |
|---|---|
DeviceTestRunOptions |
|
setDisableIsolatedStorage
public DeviceTestRunOptions setDisableIsolatedStorage (boolean disableIsolatedStorage)
ホスト側から使用される「am インストルメント」に --no-isolated-storage を追加するかどうかを設定します。
| パラメータ | |
|---|---|
disableIsolatedStorage |
boolean |
| 戻り値 | |
|---|---|
DeviceTestRunOptions |
|
setDisableRestart
public DeviceTestRunOptions setDisableRestart (boolean disableRestart)
ホスト側から使用される「am インストルメント」に --no-restart を追加するかどうかを設定します。
| パラメータ | |
|---|---|
disableRestart |
boolean |
| 戻り値 | |
|---|---|
DeviceTestRunOptions |
|
setDisableTestApiCheck
public DeviceTestRunOptions setDisableTestApiCheck (boolean disableTestApiCheck)
ホスト側で使用される「am インストルメント」に --no-test-api-access を追加するかどうかを設定します。
| パラメータ | |
|---|---|
disableTestApiCheck |
boolean |
| 戻り値 | |
|---|---|
DeviceTestRunOptions |
|
setDisableWindowAnimation
public DeviceTestRunOptions setDisableWindowAnimation (boolean disableWindowAnimation)
ホスト側で使用される「am インストルメント」に --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)
install コマンドの追加オプションを設定します。
| パラメータ | |
|---|---|
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 |
|