BaseHostJUnit4Test

public abstract class BaseHostJUnit4Test
extends Object implements IAbiReceiver, ITestInformationReceiver

java.lang.Object
   ↳ com.android.tradefed.testtype.junit4.BaseHostJUnit4Test


ホスト JUnit4 スタイルのテストを実行するための基本テストクラス。このクラスは、ホスト側からインストゥルメンテーション テストをインストール、実行、クリーンアップするためのサポートを提供します。このクラスはマルチデバイスに対応しています。重複したユーティリティと基本クラスを避けるため、ホスト側からインストルメンテーション テストを実行するための信頼できる唯一の情報源である必要があります。

概要

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

BaseHostJUnit4Test()

パブリック メソッド

final void autoTearDown()

インストールされているすべての apk の自動分解。

final IAbi getAbi()
final IBuildInfo getBuild()
final ITestDevice getDevice()
final IInvocationContext getInvocationContext()
final TestRunResult getLastDeviceRunResults()

実行された最新の runDeviceTests の結果である TestRunResult を返します。

final List<ITestDevice> 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 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, boolean instrumentInPcc, Map<String, String> instrumentationArgs, List<ITestLifeCycleReceiver> extraListeners)

インストールされたインストルメンテーション パッケージを実行するメソッド。

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, Map<String, String> instrumentationArgs, List<ITestLifeCycleReceiver> extraListeners)

インストールされたインストルメンテーション パッケージを実行するメソッド。

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, Map<String, String> instrumentationArgs)

インストールされたインストルメンテーション パッケージを実行するメソッド。

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 pkgName, String testClassName, String testMethodName, Long testTimeoutMs)

インストールされたインストルメンテーション パッケージを実行するメソッド。

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, Map<String, String> instrumentationArgs, List<ITestLifeCycleReceiver> 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(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 ()

パブリック メソッド

autoTearDown

public final void autoTearDown ()

インストールされているすべての APK の自動分解。これにより、インストールされたデバイスからすべての apk がアンインストールされます。

例外
DeviceNotAvailableException

getAbi

public final IAbi getAbi ()

戻り値
IAbi

getBuild

public final IBuildInfo getBuild ()

戻り値
IBuildInfo

getDevice

public final ITestDevice getDevice ()

戻り値
ITestDevice

getInvocationContext

public final IInvocationContext getInvocationContext ()

戻り値
IInvocationContext

getLastDeviceRunResults

public final TestRunResult getLastDeviceRunResults ()

実行された最新の runDeviceTests の結果である TestRunResult を返します。結果がない場合は null。

戻り値
TestRunResult

getListDevices

public final List<ITestDevice> getListDevices ()

戻り値
List<ITestDevice>

getTestInformation

public TestInformation getTestInformation ()

戻り値
TestInformation

hasDeviceFeature

public boolean hasDeviceFeature (String feature)

パラメータ
feature String

戻り値
boolean

例外
DeviceNotAvailableException

installPackage

public final void installPackage (DeviceTestRunOptions options)

デバイスに DeviceTestRunOptions に基づく APK をインストールします。Apk は自動的にクリーンアップされます。

パラメータ
options DeviceTestRunOptions: パッケージのインストール オプション。

例外
DeviceNotAvailableException
TargetSetupError

installPackage

public final void installPackage (String apkFileName, 
                String... options)

デバイスに名前を指定して APK をインストールします。Apk は自動的にクリーンアップされます。

パラメータ
apkFileName String: APK ファイルの名前。

options String: インストール コマンドに渡される追加オプション

例外
DeviceNotAvailableException
TargetSetupError

installPackage

public final void installPackage (ITestDevice device, 
                String apkFileName, 
                String... options)

指定されたデバイスに、指定された名前の apk をインストールします。Apk は自動的にクリーンアップされます。

パラメータ
device ITestDevice: APK をインストールする ITestDevice

apkFileName String: APK ファイルの名前。

options String: インストール コマンドに渡される追加オプション

例外
DeviceNotAvailableException
TargetSetupError

installPackageAsUser

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: インストール コマンドに渡される追加オプション

例外
DeviceNotAvailableException
TargetSetupError

installPackageAsUser

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: インストール コマンドに渡される追加オプション

例外
DeviceNotAvailableException
TargetSetupError

isPackageInstalled

public final boolean isPackageInstalled (String pkg)

指定された名前のパッケージがデバイスにインストールされているかどうかを確認します

パラメータ
pkg String: パッケージの名前

戻り値
boolean パッケージがデバイスで見つかった場合は true

例外
DeviceNotAvailableException

isPackageInstalled

public final boolean isPackageInstalled (ITestDevice device, 
                String pkg)

指定された名前のパッケージがデバイスにインストールされているかどうかを確認します

パラメータ
device ITestDevice: パッケージをアンインストールするデバイス。

pkg String: パッケージの名前

戻り値
boolean パッケージがデバイスで見つかった場合は true

例外
DeviceNotAvailableException

runDeviceTests

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, 
                boolean instrumentInPcc, 
                Map<String, String> instrumentationArgs, 
                List<ITestLifeCycleReceiver> 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

instrumentInPcc boolean

instrumentationArgs Map: インストルメンテーションに渡す引数。

extraListeners List

戻り値
boolean 失敗せずに成功した場合は true。それ以外は False が返されます。

例外
DeviceNotAvailableException

runDeviceTests

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, 
                Map<String, String> instrumentationArgs, 
                List<ITestLifeCycleReceiver> 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 Map: インストルメンテーションに渡す引数。

extraListeners List

戻り値
boolean 失敗せずに成功した場合は true。それ以外は False が返されます。

例外
DeviceNotAvailableException

runDeviceTests

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, 
                Map<String, String> 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 Map: インストルメンテーションに渡す引数。

戻り値
boolean 失敗せずに成功した場合は true。それ以外は False が返されます。

例外
DeviceNotAvailableException

runDeviceTests

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 が返されます。

例外
DeviceNotAvailableException

runDeviceTests

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 が返されます。

例外
DeviceNotAvailableException

runDeviceTests

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 が返されます。

例外
DeviceNotAvailableException

runDeviceTests

public final boolean runDeviceTests (String pkgName, 
                String testClassName, 
                String testMethodName)

インストールされたインストルメンテーション パッケージを実行するメソッド。直後に getLastDeviceRunResults() を使用して、結果の詳細を取得します。

パラメータ
pkgName String: 実行するパッケージの名前。

testClassName String: 実行するテストクラスの名前。

testMethodName String: 実行するクラスのテストメソッドの名前。

戻り値
boolean 失敗せずに成功した場合は true。それ以外は False が返されます。

例外
DeviceNotAvailableException

runDeviceTests

public final boolean runDeviceTests (DeviceTestRunOptions options)

DeviceTestRunOptions の情報に基づいて計測ベースを実行します。

パラメータ
options DeviceTestRunOptions: 計測設定を駆動する DeviceTestRunOptions

戻り値
boolean 失敗せずに成功した場合は true。それ以外は False が返されます。

例外
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException

runDeviceTests

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, 
                Map<String, String> instrumentationArgs, 
                List<ITestLifeCycleReceiver> 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 Map: インストルメンテーションに渡す引数。

extraListeners List

戻り値
boolean 失敗せずに成功した場合は true。それ以外は False が返されます。

例外
DeviceNotAvailableException

runDeviceTests

public final boolean runDeviceTests (ITestDevice device, 
                String pkgName, 
                String testClassName, 
                String testMethodName)

インストールされたインストルメンテーション パッケージを実行するメソッド。直後に getLastDeviceRunResults() を使用して、結果の詳細を取得します。

パラメータ
device ITestDevice: インストルメンテーションを実行するデバイス。

pkgName String: 実行するパッケージの名前。

testClassName String: 実行するテストクラスの名前。

testMethodName String: 実行するクラスのテストメソッドの名前。

戻り値
boolean 失敗せずに成功した場合は true。それ以外は False が返されます。

例外
DeviceNotAvailableException

runDeviceTests

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 が返されます。

例外
DeviceNotAvailableException

runDeviceTests

public final boolean runDeviceTests (String pkgName, 
                String testClassName)

インストールされたインストルメンテーション パッケージを実行するメソッド。直後に getLastDeviceRunResults() を使用して、結果の詳細を取得します。

パラメータ
pkgName String: 実行するパッケージの名前。

testClassName String: 実行するテストクラスの名前。

戻り値
boolean 失敗せずに成功した場合は true。それ以外は False が返されます。

例外
DeviceNotAvailableException

runDeviceTests

public final boolean runDeviceTests (String pkgName, 
                String testClassName, 
                Long testTimeoutMs)

インストールされたインストルメンテーション パッケージを実行するメソッド。直後に getLastDeviceRunResults() を使用して、結果の詳細を取得します。

パラメータ
pkgName String: 実行するパッケージの名前。

testClassName String: 実行するテストクラスの名前。

testTimeoutMs Long: 各テストケースに適用されるタイムアウト(ミリ秒単位)。

戻り値
boolean 失敗せずに成功した場合は true。それ以外は False が返されます。

例外
DeviceNotAvailableException

runDeviceTests

public final boolean runDeviceTests (String runner, 
                String pkgName, 
                String testClassName, 
                String testMethodName)

インストールされたインストルメンテーション パッケージを実行するメソッド。直後に getLastDeviceRunResults() を使用して、結果の詳細を取得します。

パラメータ
runner String: 使用するインストルメンテーション ランナー。

pkgName String: 実行するパッケージの名前。

testClassName String: 実行するテストクラスの名前。

testMethodName String: 実行するクラスのテストメソッドの名前。

戻り値
boolean 失敗せずに成功した場合は true。それ以外は False が返されます。

例外
DeviceNotAvailableException

setAbi

public final void setAbi (IAbi abi)

パラメータ
abi IAbi

setTestInformation

public final void setTestInformation (TestInformation testInformation)

パラメータ
testInformation TestInformation

uninstallPackage

public final String uninstallPackage (String pkgName)

デバイスのパッケージをアンインストールします。

パラメータ
pkgName String: アンインストールする Android パッケージ

戻り値
String エラーコードを含む String、または成功した場合は null

例外
DeviceNotAvailableException

uninstallPackage

public final String uninstallPackage (ITestDevice device, 
                String pkgName)

デバイス上のパッケージをアンインストールします

パラメータ
device ITestDevice: パッケージをアンインストールするデバイス。

pkgName String: アンインストールする Android パッケージ

戻り値
String エラーコードを含む String、または成功した場合は null

例外
DeviceNotAvailableException