Test zainstalowanych instrumentów
public class InstalledInstrumentationsTest
extends Object
implements IDeviceTest , IShardableTest , IMetricCollectorReceiver , IAutoRetriableTest , IConfigurationReceiver
java.lang.Object | |
com.android.tradefed.testtype.InstalledInstrumentationsTest |
Uruchamia całą instrumentację znalezioną na bieżącym urządzeniu.
Streszczenie
Konstruktorzy publiczni | |
---|---|
InstalledInstrumentationsTest () |
Metody publiczne | |
---|---|
ITestDevice | getDevice () Pobierz testowane urządzenie. |
void | run ( TestInformation testInfo, ITestInvocationListener listener) Uruchamia testy i raportuje wyniki słuchaczowi. |
void | setConfiguration ( IConfiguration configuration) |
void | setDevice ( ITestDevice device) Wstrzyknąć testowane urządzenie. |
void | setMetricCollectors ( collectors) setMetricCollectors ( collectors) Ustawia listę |
boolean | shouldRetry (int attemptJustExecuted, previousResults) shouldRetry (int attemptJustExecuted, previousResults) |
split (int shardCountHint) Alternatywna wersja |
Konstruktorzy publiczni
Test zainstalowanych instrumentów
public InstalledInstrumentationsTest ()
Metody publiczne
pobierzUrządzenie
public ITestDevice getDevice ()
Pobierz testowane urządzenie.
Zwroty | |
---|---|
ITestDevice | ITestDevice |
biegać
public void run (TestInformation testInfo, ITestInvocationListener listener)
Uruchamia testy i raportuje wyniki słuchaczowi.
Parametry | |
---|---|
testInfo | TestInformation : obiekt TestInformation zawierający przydatne informacje do uruchamiania testów. |
listener | ITestInvocationListener : ITestInvocationListener wyników testów |
Rzuty | |
---|---|
DeviceNotAvailableException |
setConfiguration
public void setConfiguration (IConfiguration configuration)
IConfiguration
w użyciu.
Parametry | |
---|---|
configuration | IConfiguration |
setDevice
public void setDevice (ITestDevice device)
Wstrzyknąć testowane urządzenie.
Parametry | |
---|---|
device | ITestDevice : ITestDevice do użycia |
setMetricCollectors
public void setMetricCollectors (collectors)
Ustawia listę IMetricCollector
zdefiniowanych dla przebiegu testowego.
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 spróbować ponownie. Dokonaj również wszelkich niezbędnych zmian w IRemoteTest
, które mają zostać ponowione (zastosowanie filtrów, przygotowanie następnego uruchomienia itp.).
Parametry | |
---|---|
attemptJustExecuted | int : numer próby, którą właśnie przeprowadziliśmy. |
previousResults | TestRunResult właśnie uruchomionego testu. |
Zwroty | |
---|---|
boolean | Prawda, jeśli powinniśmy spróbować ponownie, w przeciwnym razie fałsz. |
Rzuty | |
---|---|
DeviceNotAvailableException |
rozdzielać
publicsplit (int shardCountHint)
Alternatywna wersja split()
, która udostępnia również shardCount, który próbuje się uruchomić. Jest to przydatne dla niektórych biegaczy testowych, którzy czasami nie mogą arbitralnie zdecydować.
Parametry | |
---|---|
shardCountHint | int : liczba prób odłamków. |
Zwroty | |
---|---|
zbiór podtestów do wykonania osobno lub null , jeśli test nie jest aktualnie shardable |