Test zainstalowanych instrumentów
public class InstalledInstrumentationsTest
extends Object
implements IDeviceTest , IShardableTest , IMetricCollectorReceiver , IAutoRetriableTest , IConfigurationReceiver
Obiekt Java.lang.Object | |
↳ | com.android.tradefed.testtype.InstalledInstrumentationsTest |
Uruchamia wszystkie instrumenty znalezione na bieżącym urządzeniu.
Streszczenie
Konstruktorzy publiczni | |
---|---|
InstalledInstrumentationsTest () |
Metody publiczne | |
---|---|
ITestDevice | getDevice () Oddaj urządzenie do testu. |
void | run ( TestInformation testInfo, ITestInvocationListener listener) Uruchamia testy i raportuje wyniki słuchaczowi. |
void | setConfiguration ( IConfiguration configuration) Wstrzykuje używaną |
void | setDevice ( ITestDevice device) Wstrzyknij testowane urządzenie. |
void | setMetricCollectors ( collectors) setMetricCollectors ( collectors) Ustawia listę |
boolean | shouldRetry (int attemptJustExecuted, previousResults, skipList) shouldRetry (int attemptJustExecuted, previousResults, skipList) shouldRetry (int attemptJustExecuted, previousResults, skipList) |
split (int shardCountHint) Alternatywna wersja metody |
Konstruktorzy publiczni
Test zainstalowanych instrumentów
public InstalledInstrumentationsTest ()
Metody publiczne
pobierz urządzenie
public ITestDevice getDevice ()
Oddaj urządzenie do testu.
Zwroty | |
---|---|
ITestDevice | ITestDevice |
uruchomić
public void run (TestInformation testInfo, ITestInvocationListener listener)
Uruchamia testy i raportuje wyniki słuchaczowi.
Parametry | |
---|---|
testInfo | TestInformation : Obiekt TestInformation zawierający informacje przydatne do uruchamiania testów. |
listener | ITestInvocationListener : ITestInvocationListener wyników testów |
Rzuca | |
---|---|
DeviceNotAvailableException |
ustaw konfigurację
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
zdefiniowanych dla przebiegu testu.
Parametry | |
---|---|
collectors |
powinienspróbować ponownie
public boolean shouldRetry (int attemptJustExecuted,previousResults, skipList)
Delegowany 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ź także wszelkie niezbędne zmiany w teście IRemoteTest
, który ma zostać ponowiony (zastosowanie filtrów, przygotowanie następnego uruchomienia itp.).
Parametry | |
---|---|
attemptJustExecuted | int : Numer właśnie przeprowadzonej próby. |
previousResults | TestRunResult właśnie uruchomionego testu. |
skipList |
Zwroty | |
---|---|
boolean | Prawda, jeśli powinniśmy spróbować ponownie, Fałsz w przeciwnym razie. |
Rzuca | |
---|---|
DeviceNotAvailableException |
podział
publicsplit (int shardCountHint)
Alternatywna wersja metody split()
, która udostępnia również wartość shardCount, którą próbuje się uruchomić. Jest to przydatne dla niektórych biegaczy testowych, którzy czasami nie mogą arbitralnie decydować.
Parametry | |
---|---|
shardCountHint | int : liczba prób fragmentu. |
Zwroty | |
---|---|
zbiór podtestów, które mają być wykonane osobno lub mają wartość null , jeśli testu nie można obecnie podzielić |