BaseRetryDecision

public class BaseRetryDecision
extends Object implements IConfigurationReceiver, IRetryDecision, ITestInformationReceiver

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


Implementazione di base di IRetryDecision. L'implementazione di base tiene conto solo degli indicatori locali.

Riepilogo

Costruttori pubblici

BaseRetryDecision()

Costruttore per la decisione di ripetizione

Metodi pubblici

void addLastAttempt(List<TestRunResult> lastResults)

shouldRetry(IRemoteTest,int,List) verrà probabilmente chiamato prima dell'ultimo tentativo di ripetizione, quindi potremmo non avere i risultati dell'ultimo tentativo per scopi statistici.

void addToSkipRetryList(String filterEntry)

Aggiungi una voce per evitare di riprovare.

List<String> getCommandLineArgs()

Restituisce gli argomenti della riga di comando per la decisione di riprovare.

CurrentInvocation.IsolationGrade getIsolationGrade()
int getMaxTestCaseAttempts()

Il numero massimo di tentativi per esecuzione del test durante il nuovo tentativo automatico.

int getMaxTestCaseAttempts(ModuleDefinition module)

Il numero massimo di tentativi per esecuzione del test per un determinato modulo durante il nuovo tentativo automatico.

int getMaxTestRunAttempts()

Il numero massimo di tentativi per esecuzione del test durante il nuovo tentativo automatico.

int getMaxTestRunAttempts(ModuleDefinition module)

Il numero massimo di tentativi per esecuzione del test per un determinato modulo durante il nuovo tentativo automatico.

RetryStatistics getRetryStatistics()

Restituisce l'RetryStatistics che rappresenta il tentativo.

RetryStrategy getRetryStrategy()

Il RetryStrategy utilizzato durante il nuovo tentativo automatico.

Set<String> getSkipRetrySet()
TestInformation getTestInformation()
boolean isAutoRetryEnabled()

Indica se abilitare o meno il nuovo tentativo automatico.

boolean rebootAtLastAttempt()

Se riavviare o meno il dispositivo prima dell'ultimo tentativo.

void setConfiguration(IConfiguration configuration)

Inserisce il IConfiguration in uso.

void setInvocationContext(IInvocationContext context)

Imposta il contesto di chiamata corrente.

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

Decidi se tentare o meno un nuovo tentativo.

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

Decidi se tentare o meno un nuovo tentativo.

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

Decidi se riprovare o meno la preparazione del modulo.

boolean useUpdatedReporting()

Restituisce true se dobbiamo utilizzare i report aggiornati.

Metodi protetti

void isolateRetry(List<ITestDevice> devices)

Costruttori pubblici

BaseRetryDecision

public BaseRetryDecision ()

Costruttore per la decisione di ripetizione

Metodi pubblici

addLastAttempt

public void addLastAttempt (List<TestRunResult> lastResults)

shouldRetry(IRemoteTest,int,List) verrà probabilmente chiamato prima dell'ultimo tentativo di ripetizione, quindi potremmo non avere i risultati dell'ultimo tentativo per scopi statistici. Questo metodo consente di fornire questi risultati per i calcoli statistici corretti.

addToSkipRetryList

public void addToSkipRetryList (String filterEntry)

Aggiungi una voce per evitare di riprovare.

Parametri
filterEntry String

getCommandLineArgs

public List<String> getCommandLineArgs ()

Restituisce gli argomenti della riga di comando per la decisione di riprovare.

Resi
List<String>

getIsolationGrade

public CurrentInvocation.IsolationGrade getIsolationGrade ()

Resi
CurrentInvocation.IsolationGrade

getMaxTestCaseAttempts

public int getMaxTestCaseAttempts ()

Il numero massimo di tentativi per esecuzione del test durante il nuovo tentativo automatico.

Resi
int

getMaxTestCaseAttempts

public int getMaxTestCaseAttempts (ModuleDefinition module)

Il numero massimo di tentativi per esecuzione del test per un determinato modulo durante il nuovo tentativo automatico.

Parametri
module ModuleDefinition

Resi
int

getMaxTestRunAttempts

public int getMaxTestRunAttempts ()

Il numero massimo di tentativi per esecuzione del test durante il nuovo tentativo automatico.

Resi
int

getMaxTestRunAttempts

public int getMaxTestRunAttempts (ModuleDefinition module)

Il numero massimo di tentativi per esecuzione del test per un determinato modulo durante il nuovo tentativo automatico.

Parametri
module ModuleDefinition

Resi
int

getRetryStatistics

public RetryStatistics getRetryStatistics ()

Restituisce l'RetryStatistics che rappresenta il tentativo.

Resi
RetryStatistics

getRetryStrategy

public RetryStrategy getRetryStrategy ()

Il RetryStrategy utilizzato durante il nuovo tentativo automatico.

Resi
RetryStrategy

getSkipRetrySet

public Set<String> getSkipRetrySet ()

Resi
Set<String>

getTestInformation

public TestInformation getTestInformation ()

Resi
TestInformation

isAutoRetryEnabled

public boolean isAutoRetryEnabled ()

Indica se abilitare o meno il nuovo tentativo automatico.

Resi
boolean

rebootAtLastAttempt

public boolean rebootAtLastAttempt ()

Se riavviare o meno il dispositivo prima dell'ultimo tentativo.

Resi
boolean

setConfiguration

public void setConfiguration (IConfiguration configuration)

Inserisce il IConfiguration in uso.

Parametri
configuration IConfiguration

setInvocationContext

public void setInvocationContext (IInvocationContext context)

Imposta il contesto di chiamata corrente.

Parametri
context IInvocationContext

setTestInformation

public void setTestInformation (TestInformation testInformation)

Parametri
testInformation TestInformation

shouldRetry

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

Decidi se tentare o meno un nuovo tentativo. Apporta anche le modifiche necessarie al IRemoteTest da riprovare (applicazione di filtri e così via).

Parametri
test IRemoteTest: il IRemoteTest appena eseguito.

module ModuleDefinition: l'oggetto ModuleDefinition per il modulo di test.

attemptJustExecuted int: il numero del tentativo appena eseguito.

previousResults List: l'elenco dei TestRunResult del test appena eseguito.

dnae DeviceNotAvailableException: L'eccezione DeviceNotAvailableException del dispositivo non disponibile.

Resi
boolean True se è necessario riprovare, False in caso contrario.

Genera
DeviceNotAvailableException

shouldRetry

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

Decidi se tentare o meno un nuovo tentativo. Apporta anche le modifiche necessarie al IRemoteTest da riprovare (applicazione di filtri e così via).

Parametri
test IRemoteTest: il IRemoteTest appena eseguito.

attemptJustExecuted int: il numero del tentativo appena eseguito.

previousResults List: l'elenco dei TestRunResult del test appena eseguito.

Resi
boolean True se è necessario riprovare, False in caso contrario.

Genera
DeviceNotAvailableException

shouldRetryPreparation

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

Decidi se riprovare o meno la preparazione del modulo.

Parametri
module ModuleDefinition

attempt int

maxAttempt int

Resi
RetryPreparationDecision

useUpdatedReporting

public boolean useUpdatedReporting ()

Restituisce true se dobbiamo utilizzare i report aggiornati.

Resi
boolean

Metodi protetti

isolateRetry

protected void isolateRetry (List<ITestDevice> devices)

Parametri
devices List

Genera
DeviceNotAvailableException