BaseHostJUnit4Test
public abstract class BaseHostJUnit4Test
extends Object
implements IAbiReceiver , ITestInformationReceiver
java.lang.オブジェクト |
↳ | com.android.tradefed.testtype.junit4.BaseHostJUnit4Test |
ホスト JUnit4 スタイルのテストを実行するための基本テスト クラス。このクラスは、ホスト側からインストルメンテーション テストのインストール、実行、クリーンアップをサポートします。このクラスはマルチデバイスと互換性があります。ユーティリティと基本クラスの重複を避けるために、ホスト側からインストルメンテーション テストを実行するための唯一の信頼できる情報源である必要があります。
まとめ
パブリックメソッド |
---|
final void | autoTearDown () インストールされているすべての APK の自動ティアダウン。 |
final IAbi | getAbi () |
final IBuildInfo | getBuild () |
final ITestDevice | getDevice () |
final IInvocationContext | getInvocationContext () |
final TestRunResult | getLastDeviceRunResults () 実行された最新の runDeviceTest の結果のTestRunResult を返します。 |
final | getListDevices () |
TestInformation | getTestInformation () |
boolean | hasDeviceFeature (String feature) |
final void | installPackage ( DeviceTestRunOptions options) DeviceTestRunOptions に基づいて APK をデバイスにインストールします。 |
final void | installPackage (String apkFileName, String... options) 指定された名前の APK をデバイスにインストールします。 |
final void | installPackage ( ITestDevice device, String apkFileName, String... options) 指定された名前の APK を指定されたデバイスにインストールします。 |
final void | installPackageAsUser ( ITestDevice device, String apkFileName, boolean grantPermission, int userId, String... options) 特定のデバイス上の特定のユーザーに対して、名前を付けた APK をインストールします。 |
final void | installPackageAsUser (String apkFileName, boolean grantPermission, int userId, String... options) 特定のユーザーに名前を付けて APK をインストールします。 |
final boolean | isPackageInstalled (String pkg) 指定された名前のパッケージがデバイスにインストールされているかどうかを確認します |
final boolean | isPackageInstalled ( ITestDevice device, String pkg) 指定された名前のパッケージがデバイスにインストールされているかどうかを確認します |
final boolean | runDeviceTests ( ITestDevice device, String pkgName, String testClassName, String testMethodName, Integer userId, Long testTimeoutMs) インストールされたインストルメンテーション パッケージを実行する方法。 |
final boolean | runDeviceTests ( ITestDevice device, String pkgName, String testClassName, String testMethodName, Long testTimeoutMs, Long maxTimeToOutputMs, Long maxInstrumentationTimeoutMs) インストールされたインストルメンテーション パッケージを実行する方法。 |
final boolean | runDeviceTests ( ITestDevice device, String runner, String pkgName, String testClassName, String testMethodName, Integer userId, Long testTimeoutMs, Long maxTimeToOutputMs, Long maxInstrumentationTimeoutMs, boolean checkResults, boolean isHiddenApiCheckDisabled, boolean isTestApiCheckDisabled, boolean isIsolatedStorageDisabled, boolean isWindowAnimationDisabled, instrumentationArgs, extraListeners) runDeviceTests ( ITestDevice device, String runner, String pkgName, String testClassName, String testMethodName, Integer userId, Long testTimeoutMs, Long maxTimeToOutputMs, Long maxInstrumentationTimeoutMs, boolean checkResults, boolean isHiddenApiCheckDisabled, boolean isTestApiCheckDisabled, boolean isIsolatedStorageDisabled, boolean isWindowAnimationDisabled, instrumentationArgs, extraListeners) runDeviceTests ( ITestDevice device, String runner, String pkgName, String testClassName, String testMethodName, Integer userId, Long testTimeoutMs, Long maxTimeToOutputMs, Long maxInstrumentationTimeoutMs, boolean checkResults, boolean isHiddenApiCheckDisabled, boolean isTestApiCheckDisabled, boolean isIsolatedStorageDisabled, boolean isWindowAnimationDisabled, instrumentationArgs, extraListeners) インストールされたインストルメンテーション パッケージを実行する方法。 |
final boolean | runDeviceTests ( ITestDevice device, String pkgName, String testClassName, String testMethodName, Long testTimeoutMs) インストールされたインストルメンテーション パッケージを実行する方法。 |
final boolean | runDeviceTests ( ITestDevice device, String runner, String pkgName, String testClassName, String testMethodName, Integer userId, Long testTimeoutMs, Long maxTimeToOutputMs, Long maxInstrumentationTimeoutMs, boolean checkResults, boolean isHiddenApiCheckDisabled, instrumentationArgs) runDeviceTests ( ITestDevice device, String runner, String pkgName, String testClassName, String testMethodName, Integer userId, Long testTimeoutMs, Long maxTimeToOutputMs, Long maxInstrumentationTimeoutMs, boolean checkResults, boolean isHiddenApiCheckDisabled, instrumentationArgs) インストールされたインストルメンテーション パッケージを実行する方法。 |
final boolean | runDeviceTests (String pkgName, String testClassName, String testMethodName) インストールされたインストルメンテーション パッケージを実行する方法。 |
final boolean | runDeviceTests ( DeviceTestRunOptions options) DeviceTestRunOptions の情報に基づいてインストルメンテーションを実行します。 |
final boolean | runDeviceTests ( ITestDevice device, String runner, String pkgName, String testClassName, String testMethodName, Integer userId, Long testTimeoutMs, Long maxTimeToOutputMs, Long maxInstrumentationTimeoutMs, boolean checkResults, boolean isHiddenApiCheckDisabled, boolean isTestApiCheckDisabled, boolean isIsolatedStorageDisabled, boolean isWindowAnimationDisabled, boolean isRestartDisabled, instrumentationArgs, extraListeners) runDeviceTests ( ITestDevice device, String runner, String pkgName, String testClassName, String testMethodName, Integer userId, Long testTimeoutMs, Long maxTimeToOutputMs, Long maxInstrumentationTimeoutMs, boolean checkResults, boolean isHiddenApiCheckDisabled, boolean isTestApiCheckDisabled, boolean isIsolatedStorageDisabled, boolean isWindowAnimationDisabled, boolean isRestartDisabled, instrumentationArgs, extraListeners) runDeviceTests ( ITestDevice device, String runner, String pkgName, String testClassName, String testMethodName, Integer userId, Long testTimeoutMs, Long maxTimeToOutputMs, Long maxInstrumentationTimeoutMs, boolean checkResults, boolean isHiddenApiCheckDisabled, boolean isTestApiCheckDisabled, boolean isIsolatedStorageDisabled, boolean isWindowAnimationDisabled, boolean isRestartDisabled, instrumentationArgs, extraListeners) インストールされたインストルメンテーション パッケージを実行する方法。 |
final boolean | runDeviceTests ( ITestDevice device, String pkgName, String testClassName, String testMethodName) インストールされたインストルメンテーション パッケージを実行する方法。 |
final boolean | runDeviceTests (String pkgName, String testClassName, Integer userId, Long testTimeoutMs) インストールされたインストルメンテーション パッケージを実行する方法。 |
final boolean | runDeviceTests (String pkgName, String testClassName) インストールされたインストルメンテーション パッケージを実行する方法。 |
final boolean | runDeviceTests (String pkgName, String testClassName, Long testTimeoutMs) インストールされたインストルメンテーション パッケージを実行する方法。 |
final boolean | runDeviceTests ( ITestDevice device, String runner, String pkgName, String testClassName, String testMethodName, Integer userId, Long testTimeoutMs, Long maxTimeToOutputMs, Long maxInstrumentationTimeoutMs, boolean checkResults, boolean isHiddenApiCheckDisabled, boolean isTestApiCheckDisabled, boolean isIsolatedStorageDisabled, instrumentationArgs, extraListeners) runDeviceTests ( ITestDevice device, String runner, String pkgName, String testClassName, String testMethodName, Integer userId, Long testTimeoutMs, Long maxTimeToOutputMs, Long maxInstrumentationTimeoutMs, boolean checkResults, boolean isHiddenApiCheckDisabled, boolean isTestApiCheckDisabled, boolean isIsolatedStorageDisabled, instrumentationArgs, extraListeners) runDeviceTests ( ITestDevice device, String runner, String pkgName, String testClassName, String testMethodName, Integer userId, Long testTimeoutMs, Long maxTimeToOutputMs, Long maxInstrumentationTimeoutMs, boolean checkResults, boolean isHiddenApiCheckDisabled, boolean isTestApiCheckDisabled, boolean isIsolatedStorageDisabled, instrumentationArgs, extraListeners) インストールされたインストルメンテーション パッケージを実行する方法。 |
final boolean | runDeviceTests (String runner, String pkgName, String testClassName, String testMethodName) インストールされたインストルメンテーション パッケージを実行する方法。 |
final void | setAbi ( IAbi abi) |
final void | setTestInformation ( TestInformation testInformation) |
final String | uninstallPackage (String pkgName) デバイス上のパッケージをアンインストールします。 |
final String | uninstallPackage ( ITestDevice device, String pkgName) デバイス上のパッケージをアンインストールします |
パブリックコンストラクター
BaseHostJUnit4Test
public BaseHostJUnit4Test ()
パブリックメソッド
自動ティアダウン
public final void autoTearDown ()
インストールされているすべての APK の自動ティアダウン。これにより、APK がインストールされているデバイスからすべての APK がアンインストールされます。
アビを取得
public final IAbi getAbi ()
getLastDeviceRunResults
public final TestRunResult getLastDeviceRunResults ()
実行された最新の runDeviceTest の結果のTestRunResult
を返します。結果が得られない場合は null。
getListDevices
public final getListDevices ()
デバイス機能あり
public boolean hasDeviceFeature (String feature)
インストールパッケージ
public final void installPackage (String apkFileName,
String... options)
指定された名前の APK をデバイスにインストールします。 APK は自動クリーニングされます。
パラメーター |
---|
apkFileName | String : apk ファイルの名前。 |
options | String : インストールコマンドに指定された追加オプション |
インストールパッケージ
public final void installPackage (ITestDevice device,
String apkFileName,
String... options)
指定された名前の APK を指定されたデバイスにインストールします。 APK は自動クリーニングされます。
パラメーター |
---|
device | ITestDevice : APK をインストールするITestDevice 。 |
apkFileName | String : apk ファイルの名前。 |
options | String : インストールコマンドに指定された追加オプション |
ユーザーとしてパッケージをインストール
public final void installPackageAsUser (ITestDevice device,
String apkFileName,
boolean grantPermission,
int userId,
String... options)
特定のデバイス上の特定のユーザーに対して、名前を付けた APK をインストールします。
パラメーター |
---|
device | ITestDevice : APK をインストールするITestDevice 。 |
apkFileName | String : apk ファイルの名前。 |
grantPermission | boolean : APK のインストール時に許可フラグを渡すかどうか。 |
userId | int : APK をインストールするユーザーのユーザー ID。 |
options | String : インストールコマンドに指定された追加オプション |
ユーザーとしてパッケージをインストール
public final void installPackageAsUser (String apkFileName,
boolean grantPermission,
int userId,
String... options)
特定のユーザーに名前を付けて APK をインストールします。
パラメーター |
---|
apkFileName | String : apk ファイルの名前。 |
grantPermission | boolean : APK のインストール時に許可フラグを渡すかどうか。 |
userId | int : APK をインストールするユーザーのユーザー ID。 |
options | String : インストールコマンドに指定された追加オプション |
パッケージがインストールされています
public final boolean isPackageInstalled (String pkg)
指定された名前のパッケージがデバイスにインストールされているかどうかを確認します
パラメーター |
---|
pkg | String : パッケージの名前 |
戻り値 |
---|
boolean | パッケージがデバイス上で見つかった場合は true |
パッケージがインストールされています
public final boolean isPackageInstalled (ITestDevice device,
String pkg)
指定された名前のパッケージがデバイスにインストールされているかどうかを確認します
パラメーター |
---|
device | ITestDevice : パッケージをアンインストールするデバイス。 |
pkg | String : パッケージの名前 |
戻り値 |
---|
boolean | パッケージがデバイス上で見つかった場合は true |
デバイステストの実行
public final boolean runDeviceTests (ITestDevice device,
String pkgName,
String testClassName,
String testMethodName,
Integer userId,
Long testTimeoutMs)
インストールされたインストルメンテーション パッケージを実行する方法。結果の詳細を取得するには、直後にgetLastDeviceRunResults()
を使用します。
パラメーター |
---|
device | ITestDevice : インストルメンテーションを実行するデバイス。 |
pkgName | String : 実行するパッケージの名前。 |
testClassName | String : 実行するテストクラスの名前。 |
testMethodName | String : 実行されるクラス内のテスト メソッドの名前。 |
userId | Integer : テストを実行するユーザーの ID。 null にすることもできます。 |
testTimeoutMs | Long : 各テスト ケースに適用されるタイムアウト (ミリ秒)。 |
戻り値 |
---|
boolean | 失敗せずに成功した場合は True。それ以外の場合は false。 |
デバイステストの実行
public final boolean runDeviceTests (ITestDevice device,
String pkgName,
String testClassName,
String testMethodName,
Long testTimeoutMs,
Long maxTimeToOutputMs,
Long maxInstrumentationTimeoutMs)
インストールされたインストルメンテーション パッケージを実行する方法。結果の詳細を取得するには、直後にgetLastDeviceRunResults()
を使用します。
パラメーター |
---|
device | ITestDevice : インストルメンテーションを実行するデバイス。 |
pkgName | String : 実行するパッケージの名前。 |
testClassName | String : 実行するテストクラスの名前。 |
testMethodName | String : 実行されるクラス内のテスト メソッドの名前。 |
testTimeoutMs | Long : 各テスト ケースに適用されるタイムアウト (ミリ秒)。 |
maxTimeToOutputMs | Long : テストが何かの出力を開始するために必要な最大タイムアウト。 |
maxInstrumentationTimeoutMs | Long : 完全なインストルメンテーションが完了するまでに必要な最大タイムアウト。 |
戻り値 |
---|
boolean | 失敗せずに成功した場合は True。それ以外の場合は false。 |
デバイステストの実行
public final boolean runDeviceTests (ITestDevice device,
String runner,
String pkgName,
String testClassName,
String testMethodName,
Integer userId,
Long testTimeoutMs,
Long maxTimeToOutputMs,
Long maxInstrumentationTimeoutMs,
boolean checkResults,
boolean isHiddenApiCheckDisabled,
boolean isTestApiCheckDisabled,
boolean isIsolatedStorageDisabled,
boolean isWindowAnimationDisabled,
instrumentationArgs,
extraListeners)
インストールされたインストルメンテーション パッケージを実行する方法。結果の詳細を取得するには、直後にgetLastDeviceRunResults()
を使用します。
パラメーター |
---|
device | ITestDevice : インストルメンテーションを実行するデバイス。 |
runner | String |
pkgName | String : 実行するパッケージの名前。 |
testClassName | String : 実行するテストクラスの名前。 |
testMethodName | String : 実行されるクラス内のテスト メソッドの名前。 |
userId | Integer : テストを実行するユーザーの ID。 null にすることもできます。 |
testTimeoutMs | Long : 各テスト ケースに適用されるタイムアウト (ミリ秒)。 |
maxTimeToOutputMs | Long : テストが何かの出力を開始するために必要な最大タイムアウト。 |
maxInstrumentationTimeoutMs | Long : 完全なインストルメンテーションが完了するまでに必要な最大タイムアウト。 |
checkResults | boolean : 結果のクラッシュがチェックされるかどうか。 |
isHiddenApiCheckDisabled | boolean : 非表示の API チェックを無効にするかどうか。 |
isTestApiCheckDisabled | boolean : テスト API チェックを無効にするかどうか。 |
isIsolatedStorageDisabled | boolean : 分離ストレージを無効にするかどうか。 |
isWindowAnimationDisabled | boolean : ウィンドウアニメーションを無効にするかどうか。 |
instrumentationArgs | : インストルメンテーションに渡す引数。 |
extraListeners | |
戻り値 |
---|
boolean | 失敗せずに成功した場合は True。それ以外の場合は false。 |
デバイステストの実行
public final boolean runDeviceTests (ITestDevice device,
String pkgName,
String testClassName,
String testMethodName,
Long testTimeoutMs)
インストールされたインストルメンテーション パッケージを実行する方法。結果の詳細を取得するには、直後にgetLastDeviceRunResults()
を使用します。
パラメーター |
---|
device | ITestDevice : インストルメンテーションを実行するデバイス。 |
pkgName | String : 実行するパッケージの名前。 |
testClassName | String : 実行するテストクラスの名前。 |
testMethodName | String : 実行されるクラス内のテスト メソッドの名前。 |
testTimeoutMs | Long : 各テスト ケースに適用されるタイムアウト (ミリ秒)。 |
戻り値 |
---|
boolean | 失敗せずに成功した場合は True。それ以外の場合は false。 |
デバイステストの実行
public final boolean runDeviceTests (ITestDevice device,
String runner,
String pkgName,
String testClassName,
String testMethodName,
Integer userId,
Long testTimeoutMs,
Long maxTimeToOutputMs,
Long maxInstrumentationTimeoutMs,
boolean checkResults,
boolean isHiddenApiCheckDisabled,
instrumentationArgs)
インストールされたインストルメンテーション パッケージを実行する方法。結果の詳細を取得するには、直後にgetLastDeviceRunResults()
を使用します。
パラメーター |
---|
device | ITestDevice : インストルメンテーションを実行するデバイス。 |
runner | String |
pkgName | String : 実行するパッケージの名前。 |
testClassName | String : 実行するテストクラスの名前。 |
testMethodName | String : 実行されるクラス内のテスト メソッドの名前。 |
userId | Integer : テストを実行するユーザーの ID。 null にすることもできます。 |
testTimeoutMs | Long : 各テスト ケースに適用されるタイムアウト (ミリ秒)。 |
maxTimeToOutputMs | Long : テストが何かの出力を開始するために必要な最大タイムアウト。 |
maxInstrumentationTimeoutMs | Long : 完全なインストルメンテーションが完了するまでに必要な最大タイムアウト。 |
checkResults | boolean : 結果のクラッシュがチェックされるかどうか。 |
isHiddenApiCheckDisabled | boolean : 非表示の API チェックを無効にするかどうか。 |
instrumentationArgs | : インストルメンテーションに渡す引数。 |
戻り値 |
---|
boolean | 失敗せずに成功した場合は True。それ以外の場合は false。 |
デバイステストの実行
public final boolean runDeviceTests (String pkgName,
String testClassName,
String testMethodName)
インストールされたインストルメンテーション パッケージを実行する方法。結果の詳細を取得するには、直後にgetLastDeviceRunResults()
を使用します。
パラメーター |
---|
pkgName | String : 実行するパッケージの名前。 |
testClassName | String : 実行するテストクラスの名前。 |
testMethodName | String : 実行されるクラス内のテスト メソッドの名前。 |
戻り値 |
---|
boolean | 失敗せずに成功した場合は True。それ以外の場合は false。 |
デバイステストの実行
public final boolean runDeviceTests (ITestDevice device,
String runner,
String pkgName,
String testClassName,
String testMethodName,
Integer userId,
Long testTimeoutMs,
Long maxTimeToOutputMs,
Long maxInstrumentationTimeoutMs,
boolean checkResults,
boolean isHiddenApiCheckDisabled,
boolean isTestApiCheckDisabled,
boolean isIsolatedStorageDisabled,
boolean isWindowAnimationDisabled,
boolean isRestartDisabled,
instrumentationArgs,
extraListeners)
インストールされたインストルメンテーション パッケージを実行する方法。結果の詳細を取得するには、直後にgetLastDeviceRunResults()
を使用します。
パラメーター |
---|
device | ITestDevice : インストルメンテーションを実行するデバイス。 |
runner | String |
pkgName | String : 実行するパッケージの名前。 |
testClassName | String : 実行するテストクラスの名前。 |
testMethodName | String : 実行されるクラス内のテスト メソッドの名前。 |
userId | Integer : テストを実行するユーザーの ID。 null にすることもできます。 |
testTimeoutMs | Long : 各テスト ケースに適用されるタイムアウト (ミリ秒)。 |
maxTimeToOutputMs | Long : テストが何かの出力を開始するために必要な最大タイムアウト。 |
maxInstrumentationTimeoutMs | Long : 完全なインストルメンテーションが完了するまでに必要な最大タイムアウト。 |
checkResults | boolean : 結果のクラッシュがチェックされるかどうか。 |
isHiddenApiCheckDisabled | boolean : 非表示の API チェックを無効にするかどうか。 |
isTestApiCheckDisabled | boolean : テスト API チェックを無効にするかどうか。 |
isIsolatedStorageDisabled | boolean : 分離ストレージを無効にするかどうか。 |
isWindowAnimationDisabled | boolean : ウィンドウアニメーションを無効にするかどうか。 |
isRestartDisabled | boolean |
instrumentationArgs | : インストルメンテーションに渡す引数。 |
extraListeners | |
戻り値 |
---|
boolean | 失敗せずに成功した場合は True。それ以外の場合は false。 |
デバイステストの実行
public final boolean runDeviceTests (ITestDevice device,
String pkgName,
String testClassName,
String testMethodName)
インストールされたインストルメンテーション パッケージを実行する方法。結果の詳細を取得するには、直後にgetLastDeviceRunResults()
を使用します。
パラメーター |
---|
device | ITestDevice : インストルメンテーションを実行するデバイス。 |
pkgName | String : 実行するパッケージの名前。 |
testClassName | String : 実行するテストクラスの名前。 |
testMethodName | String : 実行されるクラス内のテスト メソッドの名前。 |
戻り値 |
---|
boolean | 失敗せずに成功した場合は True。それ以外の場合は false。 |
デバイステストの実行
public final boolean runDeviceTests (String pkgName,
String testClassName,
Integer userId,
Long testTimeoutMs)
インストールされたインストルメンテーション パッケージを実行する方法。結果の詳細を取得するには、直後にgetLastDeviceRunResults()
を使用します。
パラメーター |
---|
pkgName | String : 実行するパッケージの名前。 |
testClassName | String : 実行するテストクラスの名前。 |
userId | Integer : テストを実行するユーザーの ID。 null にすることもできます。 |
testTimeoutMs | Long : 各テスト ケースに適用されるタイムアウト (ミリ秒)。 |
戻り値 |
---|
boolean | 失敗せずに成功した場合は True。それ以外の場合は false。 |
デバイステストの実行
public final boolean runDeviceTests (String pkgName,
String testClassName)
インストールされたインストルメンテーション パッケージを実行する方法。結果の詳細を取得するには、直後にgetLastDeviceRunResults()
を使用します。
パラメーター |
---|
pkgName | String : 実行するパッケージの名前。 |
testClassName | String : 実行するテストクラスの名前。 |
戻り値 |
---|
boolean | 失敗せずに成功した場合は True。それ以外の場合は false。 |
デバイステストの実行
public final boolean runDeviceTests (String pkgName,
String testClassName,
Long testTimeoutMs)
インストールされたインストルメンテーション パッケージを実行する方法。結果の詳細を取得するには、直後にgetLastDeviceRunResults()
を使用します。
パラメーター |
---|
pkgName | String : 実行するパッケージの名前。 |
testClassName | String : 実行するテストクラスの名前。 |
testTimeoutMs | Long : 各テスト ケースに適用されるタイムアウト (ミリ秒)。 |
戻り値 |
---|
boolean | 失敗せずに成功した場合は True。それ以外の場合は false。 |
デバイステストの実行
public final boolean runDeviceTests (ITestDevice device,
String runner,
String pkgName,
String testClassName,
String testMethodName,
Integer userId,
Long testTimeoutMs,
Long maxTimeToOutputMs,
Long maxInstrumentationTimeoutMs,
boolean checkResults,
boolean isHiddenApiCheckDisabled,
boolean isTestApiCheckDisabled,
boolean isIsolatedStorageDisabled,
instrumentationArgs,
extraListeners)
インストールされたインストルメンテーション パッケージを実行する方法。結果の詳細を取得するには、直後にgetLastDeviceRunResults()
を使用します。
パラメーター |
---|
device | ITestDevice : インストルメンテーションを実行するデバイス。 |
runner | String |
pkgName | String : 実行するパッケージの名前。 |
testClassName | String : 実行するテストクラスの名前。 |
testMethodName | String : 実行されるクラス内のテスト メソッドの名前。 |
userId | Integer : テストを実行するユーザーの ID。 null にすることもできます。 |
testTimeoutMs | Long : 各テスト ケースに適用されるタイムアウト (ミリ秒)。 |
maxTimeToOutputMs | Long : テストが何かの出力を開始するために必要な最大タイムアウト。 |
maxInstrumentationTimeoutMs | Long : 完全なインストルメンテーションが完了するまでに必要な最大タイムアウト。 |
checkResults | boolean : 結果のクラッシュがチェックされるかどうか。 |
isHiddenApiCheckDisabled | boolean : 非表示の API チェックを無効にするかどうか。 |
isTestApiCheckDisabled | boolean : テスト API チェックを無効にするかどうか。 |
isIsolatedStorageDisabled | boolean : 分離ストレージを無効にするかどうか。 |
instrumentationArgs | : インストルメンテーションに渡す引数。 |
extraListeners | |
戻り値 |
---|
boolean | 失敗せずに成功した場合は True。それ以外の場合は false。 |
デバイステストの実行
public final boolean runDeviceTests (String runner,
String pkgName,
String testClassName,
String testMethodName)
インストールされたインストルメンテーション パッケージを実行する方法。結果の詳細を取得するには、直後にgetLastDeviceRunResults()
を使用します。
パラメーター |
---|
runner | String : 使用されるインスツルメンテーション ランナー。 |
pkgName | String : 実行するパッケージの名前。 |
testClassName | String : 実行するテストクラスの名前。 |
testMethodName | String : 実行されるクラス内のテスト メソッドの名前。 |
戻り値 |
---|
boolean | 失敗せずに成功した場合は True。それ以外の場合は false。 |
セットアビ
public final void setAbi (IAbi abi)
public final void setTestInformation (TestInformation testInformation)
パラメーター |
---|
testInformation | TestInformation |
アンインストールパッケージ
public final String uninstallPackage (String pkgName)
デバイス上のパッケージをアンインストールします。
パラメーター |
---|
pkgName | String : アンインストールする Android パッケージ |
戻り値 |
---|
String | エラーコードを含むString 、または成功した場合はnull |
アンインストールパッケージ
public final String uninstallPackage (ITestDevice device,
String pkgName)
デバイス上のパッケージをアンインストールします
パラメーター |
---|
device | ITestDevice : パッケージをアンインストールするデバイス。 |
pkgName | String : アンインストールする Android パッケージ |
戻り値 |
---|
String | エラーコードを含むString 、または成功した場合はnull |