BaseRetryDecision

public class BaseRetryDecision
extends Object implements IRetryDecision , IConfigurationReceiver , ITestInformationReceiver

java.lang.Object
com.android.tradefed.retry.BaseRetryDecision


יישום בסיס של IRetryDecision . יישום בסיס לוקח בחשבון רק אותות מקומיים.

סיכום

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

BaseRetryDecision ()

קונסטרוקטור להחלטה על ניסיון חוזר

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

void addLastAttempt ( lastResults) addLastAttempt ( lastResults)

ERROR(/#shouldRetry(com.android.tradefed.testtype.IRemoteTest,int,List)) ייקרא ככל הנראה לפני הניסיון האחרון האחרון, כך שייתכן שחסרות לנו את תוצאות הניסיון האחרון למטרות סטטיסטיקה.

void addToSkipRetryList (String filterEntry)

הוסף ערך כדי לדלג על ניסיון חוזר.

static getFailedTestCases ( previousResults) getFailedTestCases ( previousResults)

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

CurrentInvocation.IsolationGrade getIsolationGrade ()
int getMaxRetryCount ()

המספר המרבי של ניסיונות במהלך ניסיון חוזר אוטומטי.

RetryStatistics getRetryStatistics ()

מחזירה את ה- RetryStatistics המייצג את הניסיון החוזר.

RetryStrategy getRetryStrategy ()

אסטרטגיית ה- RetryStrategy המשמשת במהלך ניסיון חוזר אוטומטי.

getSkipRetrySet ()
TestInformation getTestInformation ()
boolean isAutoRetryEnabled ()

האם לאפשר ניסיון חוזר אוטומטי או לא.

boolean rebootAtLastAttempt ()

האם לאתחל את המכשיר לפני הניסיון האחרון או לא.

void setConfiguration ( IConfiguration configuration)

מזריק את IConfiguration בשימוש.

void setInvocationContext ( IInvocationContext context)

הגדר את הקשר ההתקשרות הנוכחי.

void setTestInformation ( TestInformation testInformation)
boolean shouldRetry ( IRemoteTest test, ModuleDefinition module, int attemptJustExecuted, previousResults, DeviceNotAvailableException dnae) shouldRetry ( IRemoteTest test, ModuleDefinition module, int attemptJustExecuted, previousResults, DeviceNotAvailableException dnae)

החלט אם יש לנסות שוב או לא.

boolean shouldRetry ( IRemoteTest test, int attemptJustExecuted, previousResults) shouldRetry ( IRemoteTest test, int attemptJustExecuted, previousResults)

החלט אם יש לנסות שוב או לא.

RetryPreparationDecision shouldRetryPreparation ( ModuleDefinition module, int attempt, int maxAttempt)

החלט אם יש לנסות שוב את הכנת המודול או לא.

boolean useUpdatedReporting ()

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

שיטות מוגנות

void isolateRetry ( devices) isolateRetry ( devices)

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

BaseRetryDecision

public BaseRetryDecision ()

קונסטרוקטור להחלטה על ניסיון חוזר

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

addLastAttempt

public void addLastAttempt ( lastResults)

ERROR(/#shouldRetry(com.android.tradefed.testtype.IRemoteTest,int,List)) ייקרא ככל הנראה לפני הניסיון האחרון האחרון, כך שייתכן שחסרות לנו את תוצאות הניסיון האחרון למטרות סטטיסטיקה. שיטה זו מאפשרת לספק תוצאות אלה עבור חישובים סטטיסטיים נאותים.

addToSkipRetryList

public void addToSkipRetryList (String filterEntry)

הוסף ערך כדי לדלג על ניסיון חוזר.

פרמטרים
filterEntry String

getFailedTestCases

public static  getFailedTestCases ( previousResults)

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

פרמטרים
previousResults

החזרות

getIsolationGrade

public CurrentInvocation.IsolationGrade getIsolationGrade ()

החזרות
CurrentInvocation.IsolationGrade

getMaxRetryCount

public int getMaxRetryCount ()

המספר המרבי של ניסיונות במהלך ניסיון חוזר אוטומטי.

החזרות
int

getRetryStatistics

public RetryStatistics getRetryStatistics ()

מחזירה את ה- RetryStatistics המייצג את הניסיון החוזר.

החזרות
RetryStatistics

getRetryStrategy

public RetryStrategy getRetryStrategy ()

אסטרטגיית ה- RetryStrategy המשמשת במהלך ניסיון חוזר אוטומטי.

החזרות
RetryStrategy

getSkipRetrySet

public  getSkipRetrySet ()

החזרות

getTestInformation

public TestInformation getTestInformation ()

החזרות
TestInformation

isAutoRetryEnabled

public boolean isAutoRetryEnabled ()

האם לאפשר ניסיון חוזר אוטומטי או לא.

החזרות
boolean

rebootAtLastAttempt

public boolean rebootAtLastAttempt ()

האם לאתחל את המכשיר לפני הניסיון האחרון או לא.

החזרות
boolean

setConfiguration

public void setConfiguration (IConfiguration configuration)

מזריק את IConfiguration בשימוש.

פרמטרים
configuration IConfiguration

setInvocationContext

public void setInvocationContext (IInvocationContext context)

הגדר את הקשר ההתקשרות הנוכחי.

פרמטרים
context IInvocationContext

setTestInformation

public void setTestInformation (TestInformation testInformation)

פרמטרים
testInformation TestInformation

צריך לנסות שוב

public boolean shouldRetry (IRemoteTest test, 
                ModuleDefinition module, 
                int attemptJustExecuted, 
                 previousResults, 
                DeviceNotAvailableException dnae)

החלט אם יש לנסות שוב או לא. בצע גם את כל השינויים הדרושים ב- IRemoteTest שיש לנסות שוב (החלת מסננים וכו').

פרמטרים
test IRemoteTest : ה- IRemoteTest שרץ זה עתה.

module ModuleDefinition : אובייקט ModuleDefinition עבור מודול הבדיקה.

attemptJustExecuted int : המספר של הניסיון שהרצנו זה עתה.

previousResults : רשימת TestRunResult של הבדיקה שזה עתה רצה.

dnae DeviceNotAvailableException : החריגה DeviceNotAvailableException של התקן לא זמין.

החזרות
boolean נכון אם ננסה שוב, לא נכון אחרת.

זורק
DeviceNotAvailableException

צריך לנסות שוב

public boolean shouldRetry (IRemoteTest test, 
                int attemptJustExecuted, 
                 previousResults)

החלט אם יש לנסות שוב או לא. בצע גם את כל השינויים הדרושים ב- IRemoteTest שיש לנסות שוב (החלת מסננים וכו').

פרמטרים
test IRemoteTest : ה- IRemoteTest שרץ זה עתה.

attemptJustExecuted int : המספר של הניסיון שהרצנו זה עתה.

previousResults : רשימת TestRunResult של הבדיקה שזה עתה רצה.

החזרות
boolean נכון אם ננסה שוב, לא נכון אחרת.

זורק
DeviceNotAvailableException

shouldRetryPreparation

public RetryPreparationDecision shouldRetryPreparation (ModuleDefinition module, 
                int attempt, 
                int maxAttempt)

החלט אם יש לנסות שוב את הכנת המודול או לא.

פרמטרים
module ModuleDefinition

attempt int

maxAttempt int

החזרות
RetryPreparationDecision

useUpdatedReporting

public boolean useUpdatedReporting ()

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

החזרות
boolean

שיטות מוגנות

isolateRetry

protected void isolateRetry ( devices)

פרמטרים
devices

זורק
DeviceNotAvailableException