중첩 클래스 |
---|
class | ModuleOemTargetPreparer.ModuleInfo 모듈에 대한 정보를 저장하는 간단한 구조체 클래스 |
공개 메서드 |
---|
void | checkModuleAfterPush (ITestDevice device, pushedModules) checkModuleAfterPush (ITestDevice device, pushedModules) 푸시 후 모듈 이름 및 버전 코드 확인 |
void | setUp (TestInformation testInfo) 테스트를 위한 대상 설정을 수행하고 모듈을 푸시하여 사전 로드된 모듈을 교체합니다. |
보호된 방법 |
---|
void | checkPreloadModules (TestInformation testInfo, DeviceDescriptor deviceDescriptor) 사전 로드 모듈 정보 확인 |
String[] | getApkDirectory (ITestDevice device, String packageName) 시스템 디렉토리에서 apk 파일 경로 가져오기 |
String | getPackageVersioncode (ITestDevice device, String packageName, boolean isAPK) 패키지 이름이 지정된 모듈을 푸시한 후 패키지 버전을 확인합니다. |
ModuleOemTargetPreparer.ModuleInfo | pushFile (File moduleFile, TestInformation testInfo) apex의 경우 /system/apex/ 또는 apk의 경우 /system/**으로 파일을 푸시합니다. |
String | renameFile (ITestDevice device, File moduleFile, String packageName) 업데이트할 파일 이름을 /system에서 동일한 이름으로 바꿉니다. |
void | setupDevice (TestInformation testInfo) /system에서 파일을 푸시하기 전에 adb 루트 및 장치 다시 마운트 |
공개 생성자
ModuleOemTargetPreparer
public ModuleOemTargetPreparer ()
공개 메서드
checkModuleAfterPush
public void checkModuleAfterPush (ITestDevice device,
pushedModules)
푸시 후 모듈 이름 및 버전 코드 확인
매개변수 |
---|
device | ITestDevice |
pushedModules | : 푸시된 모듈 목록 |
던지다 |
---|
TargetSetupError | 푸시된 모듈이 없으면 예외 발생 |
DeviceNotAvailableException | 사용 가능한 장치가 없으면 예외를 던집니다. |
public void setUp (TestInformation testInfo)
테스트를 위한 대상 설정을 수행하고 모듈을 푸시하여 사전 로드된 모듈을 교체합니다.
던지다 |
---|
TargetSetupError | 환경 설정에 치명적인 오류가 발생한 경우 |
BuildError | 빌드 준비 중 오류가 발생한 경우 |
DeviceNotAvailableException | 장치가 응답하지 않는 경우 |
보호된 방법
protected void checkPreloadModules (TestInformation testInfo,
DeviceDescriptor deviceDescriptor)
사전 로드 모듈 정보 확인
매개변수 |
---|
testInfo | TestInformation : 시험 정보 |
deviceDescriptor | DeviceDescriptor |
던지다 |
---|
DeviceNotAvailableException | 사용할 수 있는 장치가 없으면 예외가 발생합니다. |
TargetSetupError | 모듈이 미리 로드되지 않은 경우 예외가 발생합니다. |
getApk디렉토리
protected String[] getApkDirectory (ITestDevice device,
String packageName)
시스템 디렉토리에서 apk 파일 경로 가져오기
매개변수 |
---|
device | ITestDevice |
packageName | String : 모듈 패키지 이름 |
보고 |
---|
String[] | APK 이름과 경로가 있는 문자열 배열 |
던지다 |
---|
DeviceNotAvailableException | 장치를 사용할 수 없는 경우 |
TargetSetupError | 패키지의 경로를 찾을 수 없는 경우 |
getPackageVersioncode
protected String getPackageVersioncode (ITestDevice device,
String packageName,
boolean isAPK)
패키지 이름이 지정된 모듈을 푸시한 후 패키지 버전을 확인합니다.
매개변수 |
---|
packageName | String : 밀어 패키지 이름 |
isAPK | boolean |
던지다 |
---|
DeviceNotAvailableException | 장치를 찾을 수 없으면 예외가 발생합니다. |
protected ModuleOemTargetPreparer.ModuleInfo pushFile (File moduleFile,
TestInformation testInfo)
apex의 경우 /system/apex/ 또는 apk의 경우 /system/**으로 파일을 푸시합니다.
매개변수 |
---|
moduleFile | File : 모듈 파일 |
testInfo | TestInformation 다음 TestInformation 호출합니다. |
던지다 |
---|
TargetSetupError | adb를 통해 파일을 푸시할 수 없는 경우 |
DeviceNotAvailableException | 장치를 사용할 수 없는 경우 |
파일명 변경
protected String renameFile (ITestDevice device,
File moduleFile,
String packageName)
업데이트할 파일 이름을 /system에서 동일한 이름으로 바꿉니다.
매개변수 |
---|
device | ITestDevice : 테스트 장치 |
moduleFile | File : 모듈 파일이 설치된다 |
packageName | String : 이름으로 / 시스템 / * |
보고 |
---|
String | 이름 변경 후 새 파일 이름 |
던지다 |
---|
TargetSetupError | 파일 이름을 변경할 수 없는 경우 |
DeviceNotAvailableException | |
protected void setupDevice (TestInformation testInfo)
/system에서 파일을 푸시하기 전에 adb 루트 및 장치 다시 마운트
던지다 |
---|
TargetSetupError | 장치를 다시 마운트할 수 없는 경우. |
DeviceNotAvailableException | |
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2021-10-04(UTC)
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"필요한 정보가 없음"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"너무 복잡함/단계 수가 너무 많음"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"오래됨"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"번역 문제"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"샘플/코드 문제"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"기타"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"이해하기 쉬움"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"문제가 해결됨"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"기타"
}]