KuruluEnstrümanlarTest
public class InstalledInstrumentationsTest
extends Object
implements IDeviceTest , IShardableTest , IMetricCollectorReceiver , IAutoRetriableTest , IConfigurationReceiver
java.lang.Nesne | |
↳ | com.android.tradefed.testtype.InstalledInstrumentationsTest |
Mevcut cihazda bulunan tüm enstrümantasyonu çalıştırır.
Özet
Kamu inşaatçıları | |
---|---|
InstalledInstrumentationsTest () |
Genel yöntemler | |
---|---|
ITestDevice | getDevice () Cihazı teste tabi tutun. |
void | run ( TestInformation testInfo, ITestInvocationListener listener) Testleri çalıştırır ve sonucu dinleyiciye bildirir. |
void | setConfiguration ( IConfiguration configuration) Kullanımdaki |
void | setDevice ( ITestDevice device) Test edilen cihazı enjekte edin. |
void | setMetricCollectors ( collectors) setMetricCollectors ( collectors) Test çalıştırması için tanımlanan |
boolean | shouldRetry (int attemptJustExecuted, previousResults) shouldRetry (int attemptJustExecuted, previousResults) |
split (int shardCountHint) Çalıştırılmaya çalışılan shardCount'u da sağlayan |
Kamu inşaatçıları
KuruluEnstrümanlarTest
public InstalledInstrumentationsTest ()
Genel yöntemler
koşmak
public void run (TestInformation testInfo, ITestInvocationListener listener)
Testleri çalıştırır ve sonucu dinleyiciye bildirir.
parametreler | |
---|---|
testInfo | TestInformation : Testleri çalıştırmak için faydalı bilgiler içeren TestInformation nesnesi. |
listener | ITestInvocationListener : test sonuçlarının ITestInvocationListener |
atar | |
---|---|
DeviceNotAvailableException |
setYapılandırma
public void setConfiguration (IConfiguration configuration)
Kullanımdaki IConfiguration
enjekte eder.
parametreler | |
---|---|
configuration | IConfiguration |
setCihaz
public void setDevice (ITestDevice device)
Test edilen cihazı enjekte edin.
parametreler | |
---|---|
device | ITestDevice : kullanılacak ITestDevice |
setMetricCollectors
public void setMetricCollectors (collectors)
Test çalıştırması için tanımlanan IMetricCollector
s listesini ayarlar.
parametreler | |
---|---|
collectors |
Yeniden denemeli
public boolean shouldRetry (int attemptJustExecuted,previousResults)
ERROR(IRetryDecision#shouldRetry(IRemoteTest, int, List)/com.android.tradefed.retry.IRetryDecision#shouldRetry(com.android.tradefed.testtype.IRemoteTest,int,List) IRetryDecision#shouldRetry(IRemoteTest, int, List))
. Yeniden denemenin denenip denenmeyeceğine karar verin. Ayrıca yeniden denenecek IRemoteTest
gerekli değişiklikleri yapın (Filtreleri uygulama, sonraki çalıştırmayı hazırlama, vb.).
parametreler | |
---|---|
attemptJustExecuted | int : Az önce çalıştırdığımız girişimin numarası. |
previousResults | TestRunResult listesi. |
İadeler | |
---|---|
boolean | Yeniden denememiz gerekirse doğru, aksi takdirde Yanlış. |
atar | |
---|---|
DeviceNotAvailableException |
bölmek
publicsplit (int shardCountHint)
Çalıştırılmaya çalışılan shardCount'u da sağlayan split()
öğesinin alternatif sürümü. Bu, bazen keyfi olarak karar veremeyen bazı test koşucuları için kullanışlıdır.
parametreler | |
---|---|
shardCountHint | int : denenen parça sayısı. |
İadeler | |
---|---|
Ayrı ayrı yürütülecek alt testler topluluğu veya test şu anda parçalanabilir değilse null |