BaseRetryDecision

public class BaseRetryDecision
extends Object implements IConfigurationReceiver, IRetryDecision, ITestInformationReceiver

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


הטמעה בסיסית של IRetryDecision. הטמעה בסיסית מתייחסת רק לאותות מקומיים.

סיכום

‫constructors ציבוריים

BaseRetryDecision()

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

‫methods ציבוריים

void addLastAttempt(List<TestRunResult> lastResults)

סביר להניח שהקריאה ל-shouldRetry(IRemoteTest,int,List) תתבצע לפני הניסיון האחרון לבצע את הפעולה, ולכן יכול להיות שחסרות לנו תוצאות מהניסיון האחרון לצורך סטטיסטי.

void addToSkipRetryList(String filterEntry)

מוסיפים ערך כדי לדלג על ניסיון חוזר.

List<String> getCommandLineArgs()

מחזירה את הארגומנטים של שורת הפקודה להחלטה על ניסיון חוזר.

CurrentInvocation.IsolationGrade getIsolationGrade()
int getMaxTestCaseAttempts()

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

int getMaxTestCaseAttempts(ModuleDefinition module)

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

int getMaxTestRunAttempts()

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

int getMaxTestRunAttempts(ModuleDefinition module)

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

RetryStatistics getRetryStatistics()

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

RetryStrategy getRetryStrategy()

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

Set<String> 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, List<TestRunResult> previousResults, DeviceNotAvailableException dnae)

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

boolean shouldRetry(IRemoteTest test, int attemptJustExecuted, List<TestRunResult> previousResults)

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

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

קובעים אם לנסות שוב את ההכנה של המודול.

boolean useUpdatedReporting()

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

שיטות מוגנות

void isolateRetry(List<ITestDevice> devices)

‫constructors ציבוריים

BaseRetryDecision

public BaseRetryDecision ()

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

‫methods ציבוריים

addLastAttempt

public void addLastAttempt (List<TestRunResult> lastResults)

סביר להניח שהקריאה ל-shouldRetry(IRemoteTest,int,List) תתבצע לפני הניסיון האחרון לבצע את הפעולה, ולכן יכול להיות שחסרות לנו תוצאות מהניסיון האחרון לצורך סטטיסטי. השיטה הזו מאפשרת לספק את התוצאות האלה לחישובים סטטיסטיים מדויקים.

addToSkipRetryList

public void addToSkipRetryList (String filterEntry)

מוסיפים ערך כדי לדלג על ניסיון חוזר.

פרמטרים
filterEntry String

getCommandLineArgs

public List<String> getCommandLineArgs ()

מחזירה את הארגומנטים של שורת הפקודה להחלטה על ניסיון חוזר.

החזרות
List<String>

getIsolationGrade

public CurrentInvocation.IsolationGrade getIsolationGrade ()

החזרות
CurrentInvocation.IsolationGrade

getMaxTestCaseAttempts

public int getMaxTestCaseAttempts ()

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

החזרות
int

getMaxTestCaseAttempts

public int getMaxTestCaseAttempts (ModuleDefinition module)

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

פרמטרים
module ModuleDefinition

החזרות
int

getMaxTestRunAttempts

public int getMaxTestRunAttempts ()

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

החזרות
int

getMaxTestRunAttempts

public int getMaxTestRunAttempts (ModuleDefinition module)

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

פרמטרים
module ModuleDefinition

החזרות
int

getRetryStatistics

public RetryStatistics getRetryStatistics ()

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

החזרות
RetryStatistics

getRetryStrategy

public RetryStrategy getRetryStrategy ()

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

החזרות
RetryStrategy

getSkipRetrySet

public Set<String> getSkipRetrySet ()

החזרות
Set<String>

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

shouldRetry

public boolean shouldRetry (IRemoteTest test, 
                ModuleDefinition module, 
                int attemptJustExecuted, 
                List<TestRunResult> previousResults, 
                DeviceNotAvailableException dnae)

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

פרמטרים
test IRemoteTest: IRemoteTest שהופעל זה עתה.

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

attemptJustExecuted int: מספר הניסיון שהרצנו.

previousResults List: רשימת TestRunResult של הבדיקה שהופעלה.

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

החזרות
boolean הפונקציה מחזירה True אם צריך לנסות שוב, אחרת היא מחזירה False.

הקפצת הודעות שגיאה (throw)
DeviceNotAvailableException

shouldRetry

public boolean shouldRetry (IRemoteTest test, 
                int attemptJustExecuted, 
                List<TestRunResult> previousResults)

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

פרמטרים
test IRemoteTest: IRemoteTest שהופעל זה עתה.

attemptJustExecuted int: מספר הניסיון שהרצנו.

previousResults List: רשימת TestRunResult של הבדיקה שהופעלה.

החזרות
boolean הפונקציה מחזירה True אם צריך לנסות שוב, אחרת היא מחזירה False.

הקפצת הודעות שגיאה (throw)
DeviceNotAvailableException

shouldRetryPreparation

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

קובעים אם לנסות שוב את ההכנה של המודול.

פרמטרים
module ModuleDefinition

attempt int

maxAttempt int

החזרות
RetryPreparationDecision

useUpdatedReporting

public boolean useUpdatedReporting ()

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

החזרות
boolean

שיטות מוגנות

isolateRetry

protected void isolateRetry (List<ITestDevice> devices)

פרמטרים
devices List

הקפצת הודעות שגיאה (throw)
DeviceNotAvailableException