Strumentazioni installateTest

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

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


Esegue tutta la strumentazione trovata sul dispositivo corrente.

Riepilogo

Costruttori pubblici

InstalledInstrumentationsTest ()

Metodi pubblici

ITestDevice getDevice ()

Ottieni il dispositivo in prova.

void run ( TestInformation testInfo, ITestInvocationListener listener)

Esegue i test e riporta i risultati al listener.

void setConfiguration ( IConfiguration configuration)

Inietta l' IConfiguration in uso.

void setDevice ( ITestDevice device)

Iniettare il dispositivo in esame.

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

getDispositivo

public ITestDevice getDevice ()

Ottieni il dispositivo in prova.

ritorna
ITestDevice il ITestDevice

correre

public void run (TestInformation testInfo, 
                ITestInvocationListener listener)

Esegue i test e riporta i risultati al listener.

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

listener ITestInvocationListener : ITestInvocationListener dei risultati del test

Getta
DeviceNotAvailableException

setConfigurazione

public void setConfiguration (IConfiguration configuration)

Inietta l' IConfiguration in uso.

Parametri
configuration IConfiguration

setDispositivo

public void setDevice (ITestDevice device)

Iniettare il dispositivo in esame.

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)

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)) . Decidi se riprovare o meno. Apportare inoltre le modifiche necessarie IRemoteTest da ritentare (applicazione di filtri, preparazione dell'esecuzione successiva, ecc.).

Parametri
attemptJustExecuted int : il numero del tentativo appena eseguito.

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

ritorna
boolean Vero se dovessimo riprovare, Falso altrimenti.

Getta
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 numero di shard tentato.

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