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 | true 입력 파일 영구 APK 모듈을 포함하는 경우. |
던지다 |
---|
DeviceNotAvailableException | |
TargetSetupError | |
getApk설치됨
protected getApkInstalled ()
protected String getBundletoolFileName ()
getModuleKeywordFromApexPackageName
protected String getModuleKeywordFromApexPackageName (String packageName)
apex 패키지 이름에서 키워드(예: com.android.tzdata.apex의 경우 'tzdata')를 가져옵니다.
매개변수 |
---|
packageName | String : 정점 파일의 패키지 이름. |
보고 |
---|
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 | true 이 지속적인 APK 모듈 인 경우. |
던지다 |
---|
DeviceNotAvailableException | |
TargetSetupError | |
검색 에이펙스 정보
protected ITestDevice.ApexInfo retrieveApexInfo (File testApexFile,
DeviceDescriptor deviceDescriptor)
주어진 apex 파일에서 packageName 및 versionCode를 포함하는 ApexInfo를 검색합니다.
매개변수 |
---|
testApexFile | File : 우리가에서 정보를 검색 정점 파일. |
deviceDescriptor | DeviceDescriptor |
보고 |
---|
ITestDevice.ApexInfo | ApexInfo 지정된 파일의 여기서 packageName 및 versionCode를을 포함 |
던지다 |
---|
TargetSetupError | aapt 파서가 파일을 구문 분석하지 못한 경우. |