התקן אתApexModuleTargetPreparer
public class InstallApexModuleTargetPreparer
extends SuiteApkInstaller
סיכום
שיטות מוגנות |
---|
void | addApksToTestFiles () |
void | checkApexActivation ( ITestDevice device) בדוק אם כל הקודקודים מופעלים. |
| collectApexInfoFromApexModules ( testAppFileNames, TestInformation testInfo) collectApexInfoFromApexModules ( testAppFileNames, TestInformation testInfo) אוסף מידע קודקוד ממודולי הקודקוד לבדיקת הפעלה. |
| getApkInstalled () |
String | getBundletoolFileName () |
BundletoolUtil | getBundletoolUtil () |
String | getModuleKeywordFromApexPackageName (String packageName) מקבל את מילת המפתח (למשל, 'tzdata' עבור com.android.tzdata.apex) משם החבילה apex. |
| getModulesFailToActivate ( activatedApexes) getModulesFailToActivate ( activatedApexes) קבל מודולים שלא הצליחו להיות מופעלים. |
| getSplitsForApks ( TestInformation testInfo, File moduleFile) מחלץ ומחזיר פיצולים עבור ה-apks שצוינו. |
void | initBundletoolUtil ( TestInformation testInfo) מאתחל את השירות bundletool עבור מחלקה זו. |
void | installTrain ( TestInformation testInfo, moduleFilenames) installTrain ( TestInformation testInfo, moduleFilenames) ניסיונות להתקין רכבת מרכזית המכילה apex על המכשיר. |
void | installUsingBundleTool ( TestInformation testInfo, testAppFileNames) installUsingBundleTool ( TestInformation testInfo, testAppFileNames) ניסיונות להתקין מודולים ראשיים באמצעות bundletool. |
void | installer ( TestInformation testInfo, testAppFileNames) installer ( TestInformation testInfo, testAppFileNames) נסה להתקין חבילה או חבילה מפוצלת במכשיר. |
ITestDevice.ApexInfo | retrieveApexInfo (File testApexFile, DeviceDescriptor deviceDescriptor) מאחזר את ApexInfo שמכיל packageName ו-versionCode מקובץ ה-apex הנתון. |
שדות
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
בנאים ציבוריים
התקן אתApexModuleTargetPreparer
public InstallApexModuleTargetPreparer ()
שיטות ציבוריות
public getModulesToInstall (TestInformation testInfo)
מקבל את המודולים שצריך להתקין ברכבת, על סמך המודולים שנטענו מראש במכשיר. מודולים שאינם נטענים מראש לא יותקנו.
החזרות |
---|
| רשימה של המודולים שיש להתקין במכשיר. |
setIgnoreIfNotPreloaded
public void setIgnoreIfNotPreloaded (boolean skip)
setSkipApexTearDown
public void setSkipApexTearDown (boolean skip)
public void setUp (TestInformation testInfo)
פרמטרים |
---|
testInfo | TestInformation |
public void tearDown (TestInformation testInfo,
Throwable e)
פרמטרים |
---|
testInfo | TestInformation |
e | Throwable |
שיטות מוגנות
addApksToTestFiles
protected void addApksToTestFiles ()
checkApexActivation
protected void checkApexActivation (ITestDevice device)
בדוק אם כל הקודקודים מופעלים.
פרמטרים |
---|
device | ITestDevice : בבדיקה. |
protected collectApexInfoFromApexModules ( testAppFileNames,
TestInformation testInfo)
אוסף מידע קודקוד ממודולי הקודקוד לבדיקת הפעלה.
פרמטרים |
---|
testAppFileNames | : רשימת שמות הקבצים של המודולים להתקנה |
testInfo | TestInformation : ה- TestInformation |
החזרות |
---|
| רשימה המכילה את apexinfo של מודולי apex ברשימות קבצי הקלט |
getApkInstalled
protected getApkInstalled ()
protected String getBundletoolFileName ()
getModuleKeywordFromApexPackageName
protected String getModuleKeywordFromApexPackageName (String packageName)
מקבל את מילת המפתח (למשל, 'tzdata' עבור com.android.tzdata.apex) משם החבילה apex.
פרמטרים |
---|
packageName | String : שם החבילה של קובץ ה-apex. |
החזרות |
---|
String | a string מילת המפתח של שם החבילה apex. |
getModulesFailToActivate
protected getModulesFailToActivate ( activatedApexes)
קבל מודולים שלא הצליחו להיות מופעלים.
פרמטרים |
---|
activatedApexes | : ערכת הקודקודים הפעילים במכשיר |
החזרות |
---|
| רשימה המכילה את apexinfo של מודולי apex הקלט שלא הצליחו להיות מופעלים. |
protected getSplitsForApks (TestInformation testInfo,
File moduleFile)
מחלץ ומחזיר פיצולים עבור ה-apks שצוינו.
פרמטרים |
---|
testInfo | TestInformation : ה- TestInformation |
moduleFile | File : קובץ המודול שממנו יש לחלץ את הפיצולים. |
החזרות |
---|
| קובץ[] המכיל את הפיצולים. |
זורק |
---|
TargetSetupError | אם לא ניתן למצוא את bundletool או שקובץ מפרט ההתקן לא מצליח ליצור. |
protected void initBundletoolUtil (TestInformation testInfo)
מאתחל את השירות bundletool עבור מחלקה זו.
protected void installTrain (TestInformation testInfo,
moduleFilenames)
ניסיונות להתקין רכבת מרכזית המכילה apex על המכשיר.
פרמטרים |
---|
testInfo | TestInformation : ה- TestInformation |
moduleFilenames | : רשימה של מחרוזות. רשימת שמות הקבצים של המודולים הראשיים שיש להתקין. |
protected void installUsingBundleTool (TestInformation testInfo,
testAppFileNames)
ניסיונות להתקין מודולים ראשיים באמצעות bundletool.
פרמטרים |
---|
testInfo | TestInformation : ה- TestInformation |
testAppFileNames | : שמות הקבצים של המודולים הטעונים מראש להתקנה. |
protected void installer (TestInformation testInfo,
testAppFileNames)
נסה להתקין חבילה או חבילה מפוצלת במכשיר.
פרמטרים |
---|
testInfo | TestInformation : ה- TestInformation עבור ההזמנה |
testAppFileNames | : ה-apks והחבילה שלהם להתקנה. |
אחזר את ApexInfo
protected ITestDevice.ApexInfo retrieveApexInfo (File testApexFile,
DeviceDescriptor deviceDescriptor)
מאחזר את ApexInfo שמכיל packageName ו-versionCode מקובץ ה-apex הנתון.
פרמטרים |
---|
testApexFile | File : קובץ ה-apex ממנו אנו שואבים מידע. |
deviceDescriptor | DeviceDescriptor |