ModuleDefinition

public class ModuleDefinition
extends Object implements ITestCollector

java.lang.Object
com.android.tradefed.testtype.suite.ModuleDefinition


מיכל עבור תצורת ריצת המבחן. כיתה זו היא עוזרת להכין ולהפעיל את המבחנים.

סיכום

שדות

public static final String ISOLATION_COST

public static final String MODULE_ABI

public static final String MODULE_CACHED

מאפיין זה מוגדר כ-true אם תוצאות מודול הבדיקה נשמרו במטמון.

public static final String MODULE_CONTROLLER

public static final String MODULE_EXTERNAL_DEPENDENCIES

public static final String MODULE_ID

מזהה מודול השם שישמש לזיהוי ייחודי של המודול במהלך testRunStart.

public static final String MODULE_ISOLATED

מאפיין זה מוגדר כ-true אם המודול פעל במכשיר שהוכן טרי.

public static final String MODULE_NAME

שם המודול הוא שם הבסיס המשויך למודול, בדרך כלל מגיע מקובץ התצורה Xml TF שממנו נטען המודול.

public static final String MODULE_PARAMETERIZATION

public static final String MODULE_TEST_COUNT

public static final String PREPARATION_TIME

public static final String RETRY_FAIL_COUNT

public static final String RETRY_SUCCESS_COUNT

public static final String RETRY_TIME

public static final String SPARSE_MODULE

מאפיין זה מוגדר כ-true אם רק אירועים ברמת המודול מדווחים.

public static final String TEAR_DOWN_TIME

public static final String TEST_TIME

בנאים ציבוריים

ModuleDefinition ()
ModuleDefinition (String name, tests, preparersPerDevice, multiPreparers, IConfiguration moduleConfig) ModuleDefinition (String name, tests, preparersPerDevice, multiPreparers, IConfiguration moduleConfig) ModuleDefinition (String name, tests, preparersPerDevice, multiPreparers, IConfiguration moduleConfig) ModuleDefinition (String name, tests, preparersPerDevice, multiPreparers, IConfiguration moduleConfig)

בַּנַאִי

ModuleDefinition (String name, tests, preparersPerDevice, suitePreparersPerDevice, multiPreparers, IConfiguration moduleConfig) ModuleDefinition (String name, tests, preparersPerDevice, suitePreparersPerDevice, multiPreparers, IConfiguration moduleConfig) ModuleDefinition (String name, tests, preparersPerDevice, suitePreparersPerDevice, multiPreparers, IConfiguration moduleConfig) ModuleDefinition (String name, tests, preparersPerDevice, suitePreparersPerDevice, multiPreparers, IConfiguration moduleConfig) ModuleDefinition (String name, tests, preparersPerDevice, suitePreparersPerDevice, multiPreparers, IConfiguration moduleConfig)

בַּנַאִי

שיטות ציבוריות

int compareTo ( ModuleDefinition moduleDef)

String getId ()

החזר את שם המודול הייחודי.

IConfiguration getModuleConfiguration ()
IInvocationContext getModuleInvocationContext ()

מחזירה את IInvocationContext המשויך למודול.

getRequiredTokens ( TestInformation testInfo)
long getRuntimeHint ()

מחזירה את הזמן המשוער להפעלת כל הבדיקות במודול.

boolean hasModuleFailed ()

מחזירה True אם נקרא testRunFailure במודול *

int neededDevices ()

מחזירה את מספר המכשירים שצפויים להפעיל את הבדיקה הזו.

int numTests ()

מחזירה את המספר הנוכחי של IRemoteTest הממתינים לביצוע.

final void reportNotExecuted ( ITestInvocationListener listener, String message)

דווח על מודולים שלא בוצעו לחלוטין.

final void run ( TestInformation moduleInfo, ITestInvocationListener listener, moduleLevelListeners, TestFailureListener failureListener, int maxRunLimit) run ( TestInformation moduleInfo, ITestInvocationListener listener, moduleLevelListeners, TestFailureListener failureListener, int maxRunLimit)

הפעל את כל ה- IRemoteTest הכלול במודול והשתמש בכל המכינים לפני ואחרי כדי להתקין ולנקות את המכשיר.

final void run ( TestInformation moduleInfo, ITestInvocationListener listener, moduleLevelListeners, TestFailureListener failureListener) run ( TestInformation moduleInfo, ITestInvocationListener listener, moduleLevelListeners, TestFailureListener failureListener)

הפעל את כל ה- IRemoteTest הכלול במודול והשתמש בכל המכינים לפני ואחרי כדי להתקין ולנקות את המכשיר.

final void run ( TestInformation moduleInfo, ITestInvocationListener listener)

הפעל את כל ה- IRemoteTest הכלול במודול והשתמש בכל המכינים לפני ואחרי כדי להתקין ולנקות את המכשיר.

Throwable runPreparation (boolean includeSuitePreparers)

הפעל מכינים של המבחן, כולל מכינים ברמת החבילה אם צוין.

void setBuild ( IBuildInfo build)

הזרקו את IBuildInfo לשימוש במהלך הבדיקות.

void setCollectTestsOnly (boolean collectTestsOnly)

מפעיל או משבית מצב איסוף בדיקות

void setDevice ( ITestDevice device)

הזרקו את ה- ITestDevice שישמש במהלך הבדיקות.

void setEnableDynamicDownload (boolean enableDynamicDownload)

האם לאפשר הורדה דינמית ברמת המודול או לא.

void setLogSaver ( ILogSaver logSaver)

העבירו את שומר יומן ההתקשרות למודול כדי שיוכל להשתמש בו במידת הצורך.

final void setMergeAttemps (boolean mergeAttempts)

קובע אם עלינו למזג תוצאות או לא.

void setMetricCollectors ( collectors) setMetricCollectors ( collectors)

הזרקו את רשימת ה- IMetricCollector לשימוש המודול.

void setRecoverVirtualDevice (boolean recoverVirtualDevice)

סטים צריכים לשחזר מכשיר וירטואלי.

final void setRetryDecision ( IRetryDecision decision)

מגדיר את IRetryDecision לשימוש עבור ניסיון חוזר תוך מודול.

boolean shouldRecoverVirtualDevice ()

חוזר אם עלינו לשחזר מכשיר וירטואלי.

String toString ()

void transferSuiteLevelOptions ( IConfiguration mSuiteConfiguration)

העתק כמה מהתצורה של רמת הסוויטה

שיטות מוגנות

boolean hasTests ()

החזר True אם למודול עדיין יש את IRemoteTest לפעול במאגר שלו.

שדות

ISOLATION_COST

public static final String ISOLATION_COST

MODULE_ABI

public static final String MODULE_ABI

MODULE_CACHED

public static final String MODULE_CACHED

מאפיין זה מוגדר כ-true אם תוצאות מודול הבדיקה נשמרו במטמון.

MODULE_CONTROLLER

public static final String MODULE_CONTROLLER

MODULE_EXTERNAL_DEPENDENCIES

public static final String MODULE_EXTERNAL_DEPENDENCIES

MODULE_ID

public static final String MODULE_ID

מזהה מודול השם שישמש לזיהוי ייחודי של המודול במהלך testRunStart. בדרך כלל זה יהיה שילוב של MODULE_ABI + MODULE_NAME.

MODULE_SOLATED

public static final String MODULE_ISOLATED

מאפיין זה מוגדר כ-true אם המודול פעל במכשיר שהוכן טרי.

MODULE_NAME

public static final String MODULE_NAME

שם המודול הוא שם הבסיס המשויך למודול, בדרך כלל מגיע מקובץ התצורה Xml TF שממנו נטען המודול.

MODULE_PARAMETERIZATION

public static final String MODULE_PARAMETERIZATION

MODULE_TEST_COUNT

public static final String MODULE_TEST_COUNT

זמן הכנה

public static final String PREPARATION_TIME

RETRY_FAIL_COUNT

public static final String RETRY_FAIL_COUNT

RETRY_SUCCESS_COUNT

public static final String RETRY_SUCCESS_COUNT

RETRY_TIME

public static final String RETRY_TIME

SPARSE_MODULE

public static final String SPARSE_MODULE

מאפיין זה מוגדר כ-true אם רק אירועים ברמת המודול מדווחים.

TEAR_DOWN_TIME

public static final String TEAR_DOWN_TIME

זמן מבחן

public static final String TEST_TIME

בנאים ציבוריים

ModuleDefinition

public ModuleDefinition ()

ModuleDefinition

public ModuleDefinition (String name, 
                 tests, 
                 preparersPerDevice, 
                 multiPreparers, 
                IConfiguration moduleConfig)

בַּנַאִי

פרמטרים
name String : שם ייחודי של תצורת הבדיקה.

tests : רשימה של IRemoteTest שצריך לפעול.

preparersPerDevice : רשימה של ITargetPreparer שישמש להגדרת ההתקן.

multiPreparers

moduleConfig IConfiguration : IConfiguration של תצורת המודול הבסיסית.

ModuleDefinition

public ModuleDefinition (String name, 
                 tests, 
                 preparersPerDevice, 
                 suitePreparersPerDevice, 
                 multiPreparers, 
                IConfiguration moduleConfig)

בַּנַאִי

פרמטרים
name String : שם ייחודי של תצורת הבדיקה.

tests : רשימה של IRemoteTest שצריך לפעול.

preparersPerDevice : רשימה של ITargetPreparer שישמש להגדרת ההתקן.

suitePreparersPerDevice

multiPreparers

moduleConfig IConfiguration : IConfiguration של תצורת המודול הבסיסית.

שיטות ציבוריות

בהשוואה ל

public int compareTo (ModuleDefinition moduleDef)

פרמטרים
moduleDef ModuleDefinition

החזרות
int

getId

public String getId ()

החזר את שם המודול הייחודי.

החזרות
String

getModuleConfiguration

public IConfiguration getModuleConfiguration ()

החזרות
IConfiguration

getModuleInvocationContext

public IInvocationContext getModuleInvocationContext ()

מחזירה את IInvocationContext המשויך למודול.

החזרות
IInvocationContext

getRequiredTokens

public  getRequiredTokens (TestInformation testInfo)

פרמטרים
testInfo TestInformation

החזרות

getRuntimeHint

public long getRuntimeHint ()

מחזירה את הזמן המשוער להפעלת כל הבדיקות במודול.

החזרות
long

hasModuleFailed

public boolean hasModuleFailed ()

מחזירה True אם נקרא testRunFailure במודול *

החזרות
boolean

נדרשים מכשירים

public int neededDevices ()

מחזירה את מספר המכשירים שצפויים להפעיל את הבדיקה הזו.

החזרות
int

numTests

public int numTests ()

מחזירה את המספר הנוכחי של IRemoteTest הממתינים לביצוע.

החזרות
int

reportNotExecuted

public final void reportNotExecuted (ITestInvocationListener listener, 
                String message)

דווח על מודולים שלא בוצעו לחלוטין.

פרמטרים
listener ITestInvocationListener

message String

לָרוּץ

public final void run (TestInformation moduleInfo, 
                ITestInvocationListener listener, 
                 moduleLevelListeners, 
                TestFailureListener failureListener, 
                int maxRunLimit)

הפעל את כל ה- IRemoteTest הכלול במודול והשתמש בכל המכינים לפני ואחרי כדי להתקין ולנקות את המכשיר.

פרמטרים
moduleInfo TestInformation : ה- TestInformation עבור המודול.

listener ITestInvocationListener : ה- ITestInvocationListener היכן לדווח על תוצאות.

moduleLevelListeners : רשימת המאזינים ברמת המודול.

failureListener TestFailureListener : מאזין מסוים לאסוף יומנים ב-testFail. יכול להיות ריק.

maxRunLimit int : המספר המרבי של ריצות עבור כל מקרה בדיקה.

זורק
DeviceNotAvailableException במקרה של חיבור לא מקוון של המכשיר.

לָרוּץ

public final void run (TestInformation moduleInfo, 
                ITestInvocationListener listener, 
                 moduleLevelListeners, 
                TestFailureListener failureListener)

הפעל את כל ה- IRemoteTest הכלול במודול והשתמש בכל המכינים לפני ואחרי כדי להתקין ולנקות את המכשיר.

פרמטרים
moduleInfo TestInformation

listener ITestInvocationListener : ה- ITestInvocationListener היכן לדווח על תוצאות.

moduleLevelListeners : רשימת המאזינים ברמת המודול.

failureListener TestFailureListener : מאזין מסוים לאסוף יומנים ב-testFail. יכול להיות ריק.

זורק
DeviceNotAvailableException במקרה של חיבור לא מקוון של המכשיר.

לָרוּץ

public final void run (TestInformation moduleInfo, 
                ITestInvocationListener listener)

הפעל את כל ה- IRemoteTest הכלול במודול והשתמש בכל המכינים לפני ואחרי כדי להתקין ולנקות את המכשיר.

פרמטרים
moduleInfo TestInformation

listener ITestInvocationListener : ה- ITestInvocationListener היכן לדווח על תוצאות.

זורק
DeviceNotAvailableException במקרה של חיבור לא מקוון של המכשיר.

ריצה הכנה

public Throwable runPreparation (boolean includeSuitePreparers)

הפעל מכינים של המבחן, כולל מכינים ברמת החבילה אם צוין.

פרמטרים
includeSuitePreparers boolean : מוגדר כ- true כדי להפעיל גם מכינים ברמת הסוויטה.

החזרות
Throwable Throwable מכל חריג שהועלה בעת הפעלת מכינים.

setBuild

public void setBuild (IBuildInfo build)

הזרקו את IBuildInfo לשימוש במהלך הבדיקות.

פרמטרים
build IBuildInfo

setCollectTestsOnly

public void setCollectTestsOnly (boolean collectTestsOnly)

מפעיל או משבית מצב איסוף בדיקות

setDevice

public void setDevice (ITestDevice device)

הזרקו את ה- ITestDevice שישמש במהלך הבדיקות.

פרמטרים
device ITestDevice

setEnableDynamicDownload

public void setEnableDynamicDownload (boolean enableDynamicDownload)

האם לאפשר הורדה דינמית ברמת המודול או לא.

פרמטרים
enableDynamicDownload boolean

setLogSaver

public void setLogSaver (ILogSaver logSaver)

העבירו את שומר יומן ההתקשרות למודול כדי שיוכל להשתמש בו במידת הצורך.

פרמטרים
logSaver ILogSaver

setMergeAttemps

public final void setMergeAttemps (boolean mergeAttempts)

קובע אם עלינו למזג תוצאות או לא.

פרמטרים
mergeAttempts boolean

setMetricCollectors

public void setMetricCollectors ( collectors)

הזרקו את רשימת ה- IMetricCollector לשימוש המודול.

פרמטרים
collectors

setRecoverVirtualDevice

public void setRecoverVirtualDevice (boolean recoverVirtualDevice)

סטים צריכים לשחזר מכשיר וירטואלי.

פרמטרים
recoverVirtualDevice boolean

setRetryDecision

public final void setRetryDecision (IRetryDecision decision)

מגדיר את IRetryDecision לשימוש עבור ניסיון חוזר תוך מודול.

פרמטרים
decision IRetryDecision

shouldRecoverVirtualDevice

public boolean shouldRecoverVirtualDevice ()

חוזר אם עלינו לשחזר מכשיר וירטואלי.

החזרות
boolean

toString

public String toString ()

החזרות
String

transferSuiteLevelOptions

public void transferSuiteLevelOptions (IConfiguration mSuiteConfiguration)

העתק כמה מהתצורה של רמת הסוויטה

פרמטרים
mSuiteConfiguration IConfiguration

שיטות מוגנות

יש מבחנים

protected boolean hasTests ()

החזר True אם למודול עדיין יש את IRemoteTest לפעול במאגר שלו. שקר אחרת.

החזרות
boolean