Strumentazioni installateTest

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 ()

Metti il ​​dispositivo in prova.

void run ( TestInformation testInfo, ITestInvocationListener listener)

Esegue i test e segnala i risultati all'ascoltatore.

void setConfiguration ( IConfiguration configuration)

Inietta 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, skipList) shouldRetry (int attemptJustExecuted, previousResults, skipList) shouldRetry (int attemptJustExecuted, previousResults, skipList)

Delegato 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

Strumentazioni installateTest

public InstalledInstrumentationsTest ()

Metodi pubblici

getDevice

public ITestDevice getDevice ()

Metti il ​​dispositivo in prova.

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 : ITestInvocationListener dei risultati del test

Lancia
DeviceNotAvailableException

setConfigurazione

public void setConfiguration (IConfiguration configuration)

Inietta 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

dovrebbeRiprovare

public boolean shouldRetry (int attemptJustExecuted, 
                 previousResults, 
                 skipList)

Delegato 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 un nuovo tentativo. Apportare inoltre le modifiche necessarie a IRemoteTest da riprovare (applicazione di filtri, preparazione dell'esecuzione successiva, ecc.).

Parametri
attemptJustExecuted int : il numero del tentativo appena eseguito.

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

skipList : l'insieme di elementi che non devono essere ritentati.

ritorna
boolean Vero se dovessimo riprovare, Falso altrimenti.

Lancia
DeviceNotAvailableException

diviso

public  split (int shardCountHint)

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

Parametri
shardCountHint int : il conteggio dei frammenti tentati.

ritorna
una raccolta di test secondari da eseguire separatamente o null se il test non è attualmente frammentabile