Mantieni tutto organizzato con le raccolte Salva e classifica i contenuti in base alle tue preferenze.

InstalledInstrumentationsTest

public class InstalledInstrumentationsTest
extends Object implements IDeviceTest , IShardableTest , IMetricCollectorReceiver , IAutoRetriableTest , IConfigurationReceiver

java.lang.Object
com.android.tradefed.testtype.InstalledInstrumentationsTest


Esegue tutta la strumentazione trovata sul dispositivo corrente.

Riepilogo

Costruttori pubblici

InstalledInstrumentationsTest ()

Metodi pubblici

ITestDevice getDevice ()

Fai testare il dispositivo.

void run ( TestInformation testInfo, ITestInvocationListener listener)

Esegue i test e segnala i risultati all'ascoltatore.

void setConfiguration ( IConfiguration configuration)

Inserisce la IConfiguration in uso.

void setDevice ( ITestDevice device)

Iniettare il dispositivo in prova.

void setMetricCollectors ( collectors) setMetricCollectors ( collectors)

Imposta l'elenco di IMetricCollector definiti per l'esecuzione del test.

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

Delegato da ERROR(IRetryDecision#shouldRetry(IRemoteTest, int, List)/com.android.tradefed.retry.IRetryDecision#shouldRetry(com.android.tradefed.testtype.IRemoteTest,int,List) IRetryDecision#shouldRetry(IRemoteTest, int, List)) .

split (int shardCountHint)

Versione alternativa di split() che fornisce anche lo shardCount che si tenta di eseguire.

Costruttori pubblici

InstalledInstrumentationsTest

public InstalledInstrumentationsTest ()

Metodi pubblici

getDevice

public ITestDevice getDevice ()

Fai testare il dispositivo.

ritorna
ITestDevice l' ITestDevice

correre

public void run (TestInformation testInfo, 
                ITestInvocationListener listener)

Esegue i test e segnala i risultati all'ascoltatore.

Parametri
testInfo TestInformation : l'oggetto TestInformation contenente informazioni utili per eseguire i test.

listener ITestInvocationListener : l' ITestInvocationListener dei risultati del test

Tiri
DeviceNotAvailableException

setConfigurazione

public void setConfiguration (IConfiguration configuration)

Inserisce la IConfiguration in uso.

Parametri
configuration IConfiguration

setDevice

public void setDevice (ITestDevice device)

Iniettare il dispositivo in prova.

Parametri
device ITestDevice : l' ITestDevice da utilizzare

setMetricCollectors

public void setMetricCollectors ( collectors)

Imposta l'elenco di IMetricCollector definiti per l'esecuzione del test.

Parametri
collectors

dovrebbeRiprova

public boolean shouldRetry (int attemptJustExecuted, 
                 previousResults)

Delegato da ERROR(IRetryDecision#shouldRetry(IRemoteTest, int, List)/com.android.tradefed.retry.IRetryDecision#shouldRetry(com.android.tradefed.testtype.IRemoteTest,int,List) IRetryDecision#shouldRetry(IRemoteTest, int, List)) . Decidere se tentare o meno di riprovare. Apportare anche le modifiche necessarie IRemoteTest da ritentare (applicazione di filtri, preparazione della prossima esecuzione, ecc.).

Parametri
attemptJustExecuted int : il numero del tentativo che abbiamo appena eseguito.

previousResults : l'elenco di TestRunResult del test appena eseguito.

ritorna
boolean Vero se dovessimo riprovare, Falso in caso contrario.

Tiri
DeviceNotAvailableException

diviso

public  split (int shardCountHint)

Versione alternativa di split() che fornisce anche lo shardCount che si tenta di eseguire. Questo è utile per alcuni corridori del test che a volte non possono decidere arbitrariamente.

Parametri
shardCountHint int : il numero di frammenti tentati.

ritorna
una raccolta di sottotest da eseguire separatamente o null se il test non è attualmente partizionabile