InstallApexModuleTargetPreparer
public class InstallApexModuleTargetPreparer
extends SuiteApkInstaller
Các lớp con trực tiếp đã biết |
Bản tóm tắt
phương pháp được bảo vệ |
---|
void | addApksToTestFiles () |
void | addStagedReadyTimeoutForAdb ( cmd) addStagedReadyTimeoutForAdb ( cmd) |
void | addTimeoutMillisForBundletool ( extraArgs) addTimeoutMillisForBundletool ( extraArgs) |
void | checkApexActivation ( ITestDevice device) Kiểm tra xem tất cả các đỉnh đã được kích hoạt chưa. |
| collectApexInfoFromApexModules ( testAppFileNames, TestInformation testInfo) collectApexInfoFromApexModules ( testAppFileNames, TestInformation testInfo) Thu thập thông tin apex từ các mô-đun apex để kiểm tra kích hoạt. |
| getApkInstalled () |
String | getBundletoolFileName () |
BundletoolUtil | getBundletoolUtil () |
String | getModuleKeywordFromApexPackageName (String packageName) Lấy từ khóa (ví dụ: 'tzdata' cho com.android.tzdata.apex) từ tên gói apex. |
| getModulesFailToActivate ( activatedApexes) getModulesFailToActivate ( activatedApexes) Nhận các mô-đun không được kích hoạt. |
| getSplitsForApks ( TestInformation testInfo, File moduleFile) Trích xuất và trả về các phần tách cho các gói ứng dụng được chỉ định. |
void | initBundletoolUtil ( TestInformation testInfo) Khởi tạo tiện ích bundletool cho lớp này. |
void | installTrain ( TestInformation testInfo, moduleFilenames) installTrain ( TestInformation testInfo, moduleFilenames) Cố gắng cài đặt tuyến đường chính có chứa apex trên thiết bị. |
void | installUsingBundleTool ( TestInformation testInfo, testAppFileNames) installUsingBundleTool ( TestInformation testInfo, testAppFileNames) Cố gắng cài đặt (các) mô-đun chính bằng bundletool. |
void | installer ( TestInformation testInfo, testAppFileNames) installer ( TestInformation testInfo, testAppFileNames) Cố gắng cài đặt một gói hoặc gói chia nhỏ trên thiết bị. |
ITestDevice.ApexInfo | retrieveApexInfo (File testApexFile, DeviceDescriptor deviceDescriptor) Truy xuất ApexInfo có chứa packageName và versionCode từ tệp apex đã cho. |
Lĩnh vực
APEX_OPTION
protected static final String APEX_OPTION
APEX_SUFFIX
protected static final String APEX_SUFFIX
APK_SUFFIX
protected static final String APK_SUFFIX
APK_ZIP_OPTION
protected static final String APK_ZIP_OPTION
CHILD_SESSION_CREATION_CMD
protected static final String CHILD_SESSION_CREATION_CMD
PARENT_SESSION_CREATION_CMD
protected static final String PARENT_SESSION_CREATION_CMD
SPLIT_APKS_SUFFIX
protected static final String SPLIT_APKS_SUFFIX
mTrainFolderPath
protected File mTrainFolderPath
nhà thầu công cộng
InstallApexModuleTargetPreparer
public InstallApexModuleTargetPreparer ()
Phương thức công khai
public getModulesToInstall (TestInformation testInfo)
Nhận các mô-đun sẽ được cài đặt trên tàu, dựa trên các mô-đun được tải sẵn trên thiết bị. Các mô-đun không được tải trước sẽ không được cài đặt.
trả lại |
---|
| Danh sách của các mô-đun nên được cài đặt trên thiết bị. |
setIgnoreIfNotPreloaded
public void setIgnoreIfNotPreloaded (boolean skip)
setSkipApexTearDown
public void setSkipApexTearDown (boolean skip)
public void setUp (TestInformation testInfo)
Thông số |
---|
testInfo | TestInformation |
public void tearDown (TestInformation testInfo,
Throwable e)
Thông số |
---|
testInfo | TestInformation |
e | Throwable |
phương pháp được bảo vệ
addApksToTestFiles
protected void addApksToTestFiles ()
addStagedReadyTimeoutForAdb
protected void addStagedReadyTimeoutForAdb ( cmd)
protected void addTimeoutMillisForBundletool ( extraArgs)
checkApexKích hoạt
protected void checkApexActivation (ITestDevice device)
Kiểm tra xem tất cả các đỉnh đã được kích hoạt chưa.
Thông số |
---|
device | ITestDevice : đang được thử nghiệm. |
protected collectApexInfoFromApexModules ( testAppFileNames,
TestInformation testInfo)
Thu thập thông tin apex từ các mô-đun apex để kiểm tra kích hoạt.
Thông số |
---|
testAppFileNames | : Danh sách tên file của các module cần cài đặt |
testInfo | TestInformation : TestInformation |
trả lại |
---|
| một danh sách chứa thông tin apex của các mô-đun apex trong danh sách tệp đầu vào |
getApk đã cài đặt
protected getApkInstalled ()
protected String getBundletoolFileName ()
getModuleKeywordFromApexPackageName
protected String getModuleKeywordFromApexPackageName (String packageName)
Lấy từ khóa (ví dụ: 'tzdata' cho com.android.tzdata.apex) từ tên gói apex.
Thông số |
---|
packageName | String : Tên gói của tệp apex. |
trả lại |
---|
String | một chuỗi Từ khóa của tên gói apex. |
getModulesFailToActivate
protected getModulesFailToActivate ( activatedApexes)
Nhận các mô-đun không được kích hoạt.
Thông số |
---|
activatedApexes | : Tập hợp các đỉnh đang hoạt động trên thiết bị |
trả lại |
---|
| một danh sách chứa thông tin apex của các mô-đun apex đầu vào không kích hoạt được. |
protected getSplitsForApks (TestInformation testInfo,
File moduleFile)
Trích xuất và trả về các phần tách cho các gói ứng dụng được chỉ định.
Thông số |
---|
testInfo | TestInformation : TestInformation |
moduleFile | File : Tệp mô-đun để trích xuất các phần tách từ đó. |
trả lại |
---|
| một Tệp [] chứa các phần tách. |
ném |
---|
TargetSetupError | nếu không thể tìm thấy bundletool hoặc tệp thông số kỹ thuật của thiết bị không tạo được. |
protected void initBundletoolUtil (TestInformation testInfo)
Khởi tạo tiện ích bundletool cho lớp này.
protected void installTrain (TestInformation testInfo,
moduleFilenames)
Cố gắng cài đặt tuyến đường chính có chứa apex trên thiết bị.
Thông số |
---|
testInfo | TestInformation : TestInformation |
moduleFilenames | : Danh sách Chuỗi. Danh sách tên tệp của các mô-đun tuyến chính sẽ được cài đặt. |
protected void installUsingBundleTool (TestInformation testInfo,
testAppFileNames)
Cố gắng cài đặt (các) mô-đun chính bằng bundletool.
Thông số |
---|
testInfo | TestInformation : TestInformation |
testAppFileNames | : tên tệp của các mô-đun được tải sẵn để cài đặt. |
protected void installer (TestInformation testInfo,
testAppFileNames)
Cố gắng cài đặt một gói hoặc gói chia nhỏ trên thiết bị.
Thông số |
---|
testInfo | TestInformation : TestInformation cho lệnh gọi |
testAppFileNames | : Các apks và gói của chúng sẽ được cài đặt. |
truy xuấtApexInfo
protected ITestDevice.ApexInfo retrieveApexInfo (File testApexFile,
DeviceDescriptor deviceDescriptor)
Truy xuất ApexInfo có chứa packageName và versionCode từ tệp apex đã cho.
Thông số |
---|
testApexFile | File : Tệp apex mà chúng tôi truy xuất thông tin từ đó. |
deviceDescriptor | DeviceDescriptor |