InstallApexModuleTargetPreparer
public class InstallApexModuleTargetPreparer
extends SuiteApkInstaller
概要
パブリックメソッド |
---|
| getModulesToInstall (TestInformation testInfo) デバイスにプリロードされているモジュールに基づいて、トレインにインストールする必要のあるモジュールを取得します。 |
void | setUp (TestInformation testInfo) |
void | tearDown (TestInformation testInfo, Throwable e) |
保護されたメソッド |
---|
| collectApexInfoFromApexModules ( testAppFileNames, TestInformation testInfo) collectApexInfoFromApexModules ( testAppFileNames, TestInformation testInfo) アクティベーションチェックのために、apexモジュールからapex情報を収集します。 |
boolean | containsPersistentApk ( testAppFileNames, TestInformation testInfo) containsPersistentApk ( testAppFileNames, TestInformation testInfo) 入力ファイルに永続的なapkが含まれているかどうかを確認します。 |
| getApkInstalled () |
String | getBundletoolFileName () |
BundletoolUtil | getBundletoolUtil () |
String | getModuleKeywordFromApexPackageName (String packageName) apexパッケージ名からキーワード(たとえば、com.android.tzdata.apexの場合は「tzdata」)を取得します。 |
| getModulesFailToActivate ( activatedApexes) getModulesFailToActivate ( activatedApexes) アクティブ化に失敗したモジュールを取得します。 |
void | installTrain (TestInformation testInfo, moduleFilenames, String[] extraArgs) installTrain (TestInformation testInfo, moduleFilenames, String[] extraArgs) デバイスに頂点を含む幹線列車をインストールしようとします。 |
void | installUsingBundleTool (TestInformation testInfo, testAppFileNames) installUsingBundleTool (TestInformation testInfo, testAppFileNames) bundletoolを使用してメインラインモジュールをインストールしようとします。 |
void | installer (TestInformation testInfo, testAppFileNames) installer (TestInformation testInfo, testAppFileNames) デバイスにパッケージまたは分割パッケージをインストールしてみてください。 |
boolean | isPersistentApk (File filename, TestInformation testInfo) apkが永続的なapkであるかどうかを確認します。 |
ITestDevice.ApexInfo | retrieveApexInfo (File testApexFile, DeviceDescriptor deviceDescriptor) 指定されたapexファイルからpackageNameとversionCodeを含むApexInfoを取得します。 |
パブリックコンストラクター
InstallApexModuleTargetPreparer
public InstallApexModuleTargetPreparer ()
パブリックメソッド
public getModulesToInstall (TestInformation testInfo)
デバイスにプリロードされているモジュールに基づいて、トレインにインストールする必要のあるモジュールを取得します。プリロードされていないモジュールはインストールされません。
戻り値 |
---|
| リストデバイスにインストールする必要があるモジュールの。 |
投げる |
---|
DeviceNotAvailableException | デバイスが利用できない場合。 |
TargetSetupError | 必須モジュールがインストールされていない場合、またはモジュールをインストールできない場合。 |
public void setUp (TestInformation testInfo)
パラメーター |
---|
testInfo | TestInformation |
投げる |
---|
BuildError | |
DeviceNotAvailableException | |
TargetSetupError | |
public void tearDown (TestInformation testInfo,
Throwable e)
パラメーター |
---|
testInfo | TestInformation |
e | Throwable |
投げる |
---|
DeviceNotAvailableException | |
保護されたメソッド
protected collectApexInfoFromApexModules ( testAppFileNames,
TestInformation testInfo)
アクティベーションチェックのために、apexモジュールからapex情報を収集します。
パラメーター |
---|
testAppFileNames | :インストールするモジュールのファイル名のリスト |
testInfo | TestInformation : TestInformation |
戻り値 |
---|
| 入力ファイルリスト内のapexモジュールのapexinfoを含むリスト |
protected boolean containsPersistentApk ( testAppFileNames,
TestInformation testInfo)
入力ファイルに永続的なapkが含まれているかどうかを確認します。
パラメーター |
---|
testAppFileNames | :インストールするモジュールのファイル名のリスト |
testInfo | TestInformation : TestInformation |
戻り値 |
---|
boolean | 入力ファイルに永続的なapkモジュールが含まれている場合はtrue 。 |
投げる |
---|
DeviceNotAvailableException | |
TargetSetupError | |
getApkInstalled
protected getApkInstalled ()
protected String getBundletoolFileName ()
getModuleKeywordFromApexPackageName
protected String getModuleKeywordFromApexPackageName (String packageName)
apexパッケージ名からキーワード(たとえば、com.android.tzdata.apexの場合は「tzdata」)を取得します。
パラメーター |
---|
packageName | String :apexファイルのパッケージ名。 |
戻り値 |
---|
String | 文字列apexパッケージ名のキーワード。 |
getModulesFailToActivate
protected getModulesFailToActivate ( activatedApexes)
アクティブ化に失敗したモジュールを取得します。
パラメーター |
---|
activatedApexes | :デバイス上のアクティブな頂点のセット |
戻り値 |
---|
| アクティブ化に失敗した入力apexモジュールのapexinfoを含むリスト。 |
投げる |
---|
DeviceNotAvailableException | |
TargetSetupError | |
protected void installTrain (TestInformation testInfo,
moduleFilenames,
String[] extraArgs)
デバイスに頂点を含む幹線列車をインストールしようとします。
パラメーター |
---|
testInfo | TestInformation : TestInformation |
moduleFilenames | :文字列のリスト。インストールするメインラインモジュールのファイル名のリスト。 |
extraArgs | String |
投げる |
---|
DeviceNotAvailableException | |
TargetSetupError | |
protected void installUsingBundleTool (TestInformation testInfo,
testAppFileNames)
bundletoolを使用してメインラインモジュールをインストールしようとします。
パラメーター |
---|
testInfo | TestInformation : TestInformation |
testAppFileNames | :インストールするプリロードされたモジュールのファイル名。 |
投げる |
---|
DeviceNotAvailableException | |
TargetSetupError | |
protected void installer (TestInformation testInfo,
testAppFileNames)
デバイスにパッケージまたは分割パッケージをインストールしてみてください。
パラメーター |
---|
testInfo | TestInformation :呼び出しのTestInformation |
testAppFileNames | :インストールするapkとそのパッケージ。 |
投げる |
---|
DeviceNotAvailableException | |
TargetSetupError | |
protected boolean isPersistentApk (File filename,
TestInformation testInfo)
apkが永続的なapkであるかどうかを確認します。
パラメーター |
---|
filename | File :チェックするapkモジュールファイル |
testInfo | TestInformation : TestInformation |
戻り値 |
---|
boolean | これが永続的なapkモジュールの場合はtrue 。 |
投げる |
---|
DeviceNotAvailableException | |
TargetSetupError | |
retrieveApexInfo
protected ITestDevice.ApexInfo retrieveApexInfo (File testApexFile,
DeviceDescriptor deviceDescriptor)
指定されたapexファイルからpackageNameとversionCodeを含むApexInfoを取得します。
パラメーター |
---|
testApexFile | File :情報を取得するapexファイル。 |
deviceDescriptor | DeviceDescriptor |
戻り値 |
---|
ITestDevice.ApexInfo | 指定されたファイルのpackageNameとApexInfo を含むApexInfo |
投げる |
---|
TargetSetupError | aaptパーサーがファイルの解析に失敗した場合。 |