InstallApexModuleTargetPreparer
public class InstallApexModuleTargetPreparer
extends SuiteApkInstaller
סיכום
שיטות מוגנות |
---|
void | addApksToTestFiles () |
| collectApexInfoFromApexModules ( testAppFileNames, TestInformation testInfo) collectApexInfoFromApexModules ( testAppFileNames, TestInformation testInfo) אוסף מידע על קודקוד ממודולי ה- apex לבדיקת הפעלה. |
boolean | containsPersistentApk ( testAppFileNames, TestInformation testInfo) containsPersistentApk ( testAppFileNames, TestInformation testInfo) בודק אם קובצי הקלט מכילים APK מתמשך. |
| getApkInstalled () |
String | getBundletoolFileName () |
BundletoolUtil | getBundletoolUtil () |
String | getModuleKeywordFromApexPackageName (String packageName) מקבל את מילת המפתח (למשל, 'tzdata' עבור com.android.tzdata.apex) בשם חבילת apex. |
| getModulesFailToActivate ( activatedApexes) getModulesFailToActivate ( activatedApexes) קבל מודולים שלא הופעלו. |
| getSplitsForApks (TestInformation testInfo, File moduleFile) מחלץ וחוזר פיצולים עבור האפליקציות שצוין. |
void | initBundletoolUtil (TestInformation testInfo) מאתחל את ה- bundletool util עבור מחלקה זו. |
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) מאחזר ApexInfo המכיל את שם החבילה ואת גרסת הקוד מקובץ ה- apex הנתון. |
שדות
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
בוני ציבור
InstallApexModuleTargetPreparer
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 לבדיקת הפעלה.
פרמטרים |
---|
testAppFileNames | : רשימת שמות הקבצים של המודולים להתקנה |
testInfo | TestInformation : The TestInformation |
החזרות |
---|
| רשימה המכילה את המידע הקודם של מודולי ה- apex ברשימות קבצי הקלט |
protected boolean containsPersistentApk ( testAppFileNames,
TestInformation testInfo)
בודק אם קובצי הקלט מכילים APK מתמשך.
פרמטרים |
---|
testAppFileNames | : רשימת שמות הקבצים של המודולים להתקנה |
testInfo | TestInformation : The TestInformation |
החזרות |
---|
boolean | true אם קבצי הקלט מכילים מודול APK מתמיד. |
זורק |
---|
DeviceNotAvailableException | |
TargetSetupError | |
getApkInstalled
protected getApkInstalled ()
protected String getBundletoolFileName ()
getModuleKeywordFromApexPackageName
protected String getModuleKeywordFromApexPackageName (String packageName)
מקבל את מילת המפתח (למשל, 'tzdata' עבור com.android.tzdata.apex) בשם חבילת apex.
פרמטרים |
---|
packageName | String : שם החבילה של קובץ איפקס. |
החזרות |
---|
String | a string מילת המפתח של שם החבילה apex. |
getModulesFailToActivate
protected getModulesFailToActivate ( activatedApexes)
קבל מודולים שלא הופעלו.
פרמטרים |
---|
activatedApexes | : קבוצת הקודים הפעילים במכשיר |
החזרות |
---|
| רשימה המכילה את המידע הקודם של מודולי קודקוד הקלט שלא הופעלו. |
זורק |
---|
DeviceNotAvailableException | |
TargetSetupError | |
protected getSplitsForApks (TestInformation testInfo,
File moduleFile)
מחלץ וחוזר פיצולים עבור האפליקציות שצוין.
פרמטרים |
---|
testInfo | TestInformation : את TestInformation |
moduleFile | File : קובץ מודול כדי לחלץ את הפיצולים מ. |
החזרות |
---|
| קובץ [] המכיל את הפיצולים. |
זורק |
---|
TargetSetupError | אם לא ניתן למצוא bundletool או אם קובץ מפרט ההתקן לא יוצר. |
protected void initBundletoolUtil (TestInformation testInfo)
מאתחל את ה- bundletool util עבור מחלקה זו.
זורק |
---|
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 | : האפליקציות והחבילה שלהן להתקנה. |
זורק |
---|
DeviceNotAvailableException | |
TargetSetupError | |
protected boolean isPersistentApk (File filename,
TestInformation testInfo)
בודק אם APK הוא APK מתמשך.
פרמטרים |
---|
filename | File : קובץ מודול APK לבדוק |
testInfo | TestInformation : The TestInformation |
החזרות |
---|
boolean | true אם זה הוא מודול APK מתמיד. |
זורק |
---|
DeviceNotAvailableException | |
TargetSetupError | |
retrieveApexInfo
protected ITestDevice.ApexInfo retrieveApexInfo (File testApexFile,
DeviceDescriptor deviceDescriptor)
מאחזר ApexInfo המכיל את שם החבילה ואת גרסת הקוד מקובץ ה- apex הנתון.
פרמטרים |
---|
testApexFile | File : קובץ איפקס אנו שולפים מן המידע. |
deviceDescriptor | DeviceDescriptor |
החזרות |
---|
ITestDevice.ApexInfo | ApexInfo המכיל את PACKAGENAME ואת קוד הגרסה של קובץ נתון |
זורק |
---|
TargetSetupError | אם מנתח aapt לא הצליח לנתח את הקובץ. |