ApexModuleTargetPreparer 설치
public class InstallApexModuleTargetPreparer
extends SuiteApkInstaller
요약
보호된 방법 |
---|
void | addApksToTestFiles () |
| 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) 활성화에 실패한 모듈을 가져옵니다. |
| getSplitsForApks (TestInformation testInfo, File moduleFile) 지정된 APK에 대한 분할을 추출하고 반환합니다. |
void | initBundletoolUtil (TestInformation testInfo) 이 클래스에 대한 Bundletool 유틸리티를 초기화합니다. |
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를 검색합니다. |
필드
APEX_SUFFIX
protected static final String APEX_SUFFIX
APK_SUFFIX
protected static final String APK_SUFFIX
SPLIT_APKS_SUFFIX
protected static final String SPLIT_APKS_SUFFIX
공개 생성자
ApexModuleTargetPreparer 설치
public InstallApexModuleTargetPreparer ()
공개 메소드
public getModulesToInstall (TestInformation testInfo)
장치에 사전 로드된 모듈을 기반으로 열차에 설치해야 하는 모듈을 가져옵니다. 사전 로드되지 않은 모듈은 설치되지 않습니다.
보고 |
---|
| 목록 장치에 설치해야 하는 모듈의 수입니다. |
던지기 |
---|
DeviceNotAvailableException | 장치를 사용할 수 없을 때. |
TargetSetupError | 필수 모듈이 설치되어 있지 않거나, 모듈을 설치할 수 없는 경우. |
setIgnoreIfNotPreloaded
public void setIgnoreIfNotPreloaded (boolean skip)
setSkipApexTearDown
public void setSkipApexTearDown (boolean skip)
public void setUp (TestInformation testInfo)
매개변수 |
---|
testInfo | TestInformation |
던지기 |
---|
BuildError | |
DeviceNotAvailableException | |
TargetSetupError | |
public void tearDown (TestInformation testInfo,
Throwable e)
매개변수 |
---|
testInfo | TestInformation |
e | Throwable |
던지기 |
---|
DeviceNotAvailableException | |
보호된 방법
addApksToTestFiles
protected void addApksToTestFiles ()
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 | |
getApk설치됨
protected getApkInstalled ()
protected String getBundletoolFileName ()
getModuleKeywordFromApexPackageName
protected String getModuleKeywordFromApexPackageName (String packageName)
apex 패키지 이름에서 키워드(예: com.android.tzdata.apex의 경우 'tzdata')를 가져옵니다.
매개변수 |
---|
packageName | String : apex 파일의 패키지 이름입니다. |
보고 |
---|
String | a string apex 패키지 이름의 키워드입니다. |
getModulesFailTo활성화
protected getModulesFailToActivate ( activatedApexes)
활성화에 실패한 모듈을 가져옵니다.
매개변수 |
---|
activatedApexes | : 장치의 활성 근관 세트 |
보고 |
---|
| 활성화에 실패한 입력 Apex 모듈의 apexinfo가 포함된 목록입니다. |
던지기 |
---|
DeviceNotAvailableException | |
TargetSetupError | |
protected getSplitsForApks (TestInformation testInfo,
File moduleFile)
지정된 APK에 대한 분할을 추출하고 반환합니다.
매개변수 |
---|
testInfo | TestInformation : TestInformation |
moduleFile | File : 분할을 추출할 모듈 파일입니다. |
던지기 |
---|
TargetSetupError | Bundletool을 찾을 수 없거나 장치 사양 파일을 생성하지 못하는 경우. |
protected void initBundletoolUtil (TestInformation testInfo)
이 클래스에 대한 Bundletool 유틸리티를 초기화합니다.
던지기 |
---|
TargetSetupError | Bundletool을 찾을 수 없는 경우. |
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 | |
검색Apex정보
protected ITestDevice.ApexInfo retrieveApexInfo (File testApexFile,
DeviceDescriptor deviceDescriptor)
지정된 apex 파일에서 packageName 및 versionCode가 포함된 ApexInfo를 검색합니다.
매개변수 |
---|
testApexFile | File : 정보를 검색하는 apex 파일입니다. |
deviceDescriptor | DeviceDescriptor |
보고 |
---|
ITestDevice.ApexInfo | 해당 파일의 packageName 및 versionCode를 포함하는 ApexInfo |
던지기 |
---|
TargetSetupError | aapt 파서가 파일을 구문 분석하지 못한 경우. |