Test Zainstalowanych Instrumentów

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

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


Uruchamia wszystkie oprzyrządowanie znalezione na bieżącym urządzeniu.

Streszczenie

Konstruktory publiczne

InstalledInstrumentationsTest ()

Metody publiczne

ITestDevice getDevice ()

Przetestuj urządzenie.

void run ( TestInformation testInfo, ITestInvocationListener listener)

Uruchamia testy i przekazuje wyniki słuchaczowi.

void setConfiguration ( IConfiguration configuration)

Wstrzykuje używaną IConfiguration .

void setDevice ( ITestDevice device)

Wstrzyknij testowane urządzenie.

void setMetricCollectors ( collectors) setMetricCollectors ( collectors)

Ustawia listę IMetricCollector s zdefiniowanych dla przebiegu testu.

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

Delegowane z 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)

Alternatywna wersja metody split() zawierająca również liczbę shardCount, która ma zostać uruchomiona.

Konstruktory publiczne

Test Zainstalowanych Instrumentów

public InstalledInstrumentationsTest ()

Metody publiczne

pobierzUrządzenie

public ITestDevice getDevice ()

Przetestuj urządzenie.

Zwroty
ITestDevice ITestDevice

uruchomić

public void run (TestInformation testInfo, 
                ITestInvocationListener listener)

Uruchamia testy i przekazuje wyniki słuchaczowi.

Parametry
testInfo TestInformation : Obiekt TestInformation zawierający informacje przydatne do uruchamiania testów.

listener ITestInvocationListener : ITestInvocationListener wyników testu

Rzuty
DeviceNotAvailableException

zestawKonfiguracja

public void setConfiguration (IConfiguration configuration)

Wstrzykuje używaną IConfiguration .

Parametry
configuration IConfiguration

ustaw urządzenie

public void setDevice (ITestDevice device)

Wstrzyknij testowane urządzenie.

Parametry
device ITestDevice : ITestDevice do użycia

setMetricCollectors

public void setMetricCollectors ( collectors)

Ustawia listę IMetricCollector s zdefiniowanych dla przebiegu testu.

Parametry
collectors

należy spróbować ponownie

public boolean shouldRetry (int attemptJustExecuted, 
                 previousResults)

Delegowane z ERROR(IRetryDecision#shouldRetry(IRemoteTest, int, List)/com.android.tradefed.retry.IRetryDecision#shouldRetry(com.android.tradefed.testtype.IRemoteTest,int,List) IRetryDecision#shouldRetry(IRemoteTest, int, List)) . Zdecyduj, czy należy ponowić próbę. Wprowadź również wszelkie niezbędne zmiany w IRemoteTest , który ma zostać ponowiony (zastosowanie filtrów, przygotowanie następnego uruchomienia itp.).

Parametry
attemptJustExecuted int : Numer próby, którą właśnie przeprowadziliśmy.

previousResults : lista TestRunResult właśnie uruchomionego testu.

Zwroty
boolean Prawda, jeśli powinniśmy spróbować ponownie, w przeciwnym razie Fałsz.

Rzuty
DeviceNotAvailableException

podział

public  split (int shardCountHint)

Alternatywna wersja metody split() zawierająca również liczbę shardCount, która ma zostać uruchomiona. Jest to przydatne dla niektórych biegaczy testowych, którzy czasami nie mogą arbitralnie decydować.

Parametry
shardCountHint int : próba zliczenia odłamków.

Zwroty
zbiór podtestów do wykonania oddzielnie lub null , jeśli test nie jest obecnie możliwy do podzielenia