LogcatCrashResultForwarder

public class LogcatCrashResultForwarder
extends ResultForwarder

java.lang.Object
com.android.tradefed.result.ResultForwarder
com.android.tradefed.result.LogcatCrashResultForwarder


Özel dinleyici: arızalarda (enstrümantasyon işleminin çökmesi), logcat'tan çökmeyi çıkarmaya çalışacak ve bunu testle ilişkili arıza mesajına ekleyecektir.

Özet

Sabitler

int MAX_NUMBER_CRASH

Alanlar

public static final String ERROR_MESSAGE

Cihaz tarafında bir şeyler ters gittiğinde enstrümantasyondan gelen özel hata mesajı.

public static final String INCOMPLETE_MESSAGE

public static final String SYSTEM_CRASH_MESSAGE

public static final TIMEOUT_MESSAGES

Kamu inşaatçıları

LogcatCrashResultForwarder ( ITestDevice device, ITestInvocationListener... listeners)

Genel yöntemler

ITestDevice getDevice ()
void setPackageName (String packageName)
void testEnded ( TestDescription test, long endTime, testMetrics) testEnded ( TestDescription test, long endTime, testMetrics)

Bitiş zamanını doğrudan belirtebileceğimiz ERROR(/#testEnded(com.android.tradefed.result.TestDescription,Map)) alternatifi.

void testFailed ( TestDescription test, FailureDescription failure)

Bireysel test senaryosunun başarısızlığını bildirir.

void testFailed ( TestDescription test, String trace)

Bireysel test senaryosunun başarısızlığını bildirir.

void testRunEnded (long elapsedTime, runMetrics) testRunEnded (long elapsedTime, runMetrics)

Test çalıştırmasının sonunu bildirir.

void testRunFailed ( FailureDescription error)

FailureDescription tarafından açıklanan bir hata nedeniyle rapor test çalıştırması tamamlanamadı.

void testRunFailed (String errorMessage)

Önemli bir hata nedeniyle rapor test çalıştırması tamamlanamadı.

void testStarted ( TestDescription test, long startTime)

Testin ne zaman başladığını da belirttiğimiz testStarted(com.android.tradefed.result.TestDescription) alternatifi, doğru ölçüm için ERROR(/#testEnded(com.android.tradefed.result.TestDescription,long,Map)) ile birleştirilir. .

Sabitler

MAX_NUMBER_CRASH

public static final int MAX_NUMBER_CRASH

Sabit Değer: 3 (0x00000003)

Alanlar

HATA MESAJI

public static final String ERROR_MESSAGE

Cihaz tarafında bir şeyler ters gittiğinde enstrümantasyondan gelen özel hata mesajı.

INCOMPLETE_MESSAGE

public static final String INCOMPLETE_MESSAGE

SYSTEM_CRASH_MESSAGE

public static final String SYSTEM_CRASH_MESSAGE

TIMEOUT_MESSAGES

public static final  TIMEOUT_MESSAGES

Kamu inşaatçıları

LogcatCrashResultForwarder

public LogcatCrashResultForwarder (ITestDevice device, 
                ITestInvocationListener... listeners)

Parametreler
device ITestDevice

listeners ITestInvocationListener

Genel yöntemler

cihaz al

public ITestDevice getDevice ()

İadeler
ITestDevice

setPaketAdı

public void setPackageName (String packageName)

Parametreler
packageName String

testSonlandı

public void testEnded (TestDescription test, 
                long endTime, 
                 testMetrics)

Bitiş zamanını doğrudan belirtebileceğimiz ERROR(/#testEnded(com.android.tradefed.result.TestDescription,Map)) alternatifi. Doğru ölçüm için testStarted(com.android.tradefed.result.TestDescription, long) ile birleştirin.

Parametreler
test TestDescription : testi tanımlar

endTime long : System.currentTimeMillis() aracılığıyla ölçülen, testin sona erdiği süre

testMetrics : yayılan metriklerin ERROR(/Map)

test başarısız

public void testFailed (TestDescription test, 
                FailureDescription failure)

Bireysel test senaryosunun başarısızlığını bildirir.

testStarted ve testEnded arasında çağrılacaktır.

Parametreler
test TestDescription : testi tanımlar

failure FailureDescription : Arızayı ve içeriğini açıklayan FailureDescription .

test başarısız

public void testFailed (TestDescription test, 
                String trace)

Bireysel test senaryosunun başarısızlığını bildirir.

testStarted ve testEnded arasında çağrılacaktır.

Parametreler
test TestDescription : testi tanımlar

trace String : hatanın yığın izlemesi

testRunEnded

public void testRunEnded (long elapsedTime, 
                 runMetrics)

Test çalıştırmasının sonunu bildirir. FIXME: Farklı türde iki Map<> arayüzümüz olamaz, bu yüzden burada HashMap kullanmak zorundayız.

Parametreler
elapsedTime long : cihaz geçen süreyi milisaniye cinsinden bildirdi

runMetrics : Metric ile yapılan bir test çalışmasının sonunda rapor edilen anahtar/değer çiftleri.

testRun Başarısız

public void testRunFailed (FailureDescription error)

FailureDescription tarafından açıklanan bir hata nedeniyle rapor test çalıştırması tamamlanamadı.

Parametreler
error FailureDescription : Arızayı ve içeriğini açıklayan FailureDescription .

testRun Başarısız

public void testRunFailed (String errorMessage)

Önemli bir hata nedeniyle rapor test çalıştırması tamamlanamadı.

Parametreler
errorMessage String : Çalıştırma hatasının nedenini açıklayan String .

testBaşladı

public void testStarted (TestDescription test, 
                long startTime)

Testin ne zaman başladığını da belirttiğimiz testStarted(com.android.tradefed.result.TestDescription) alternatifi, doğru ölçüm için ERROR(/#testEnded(com.android.tradefed.result.TestDescription,long,Map)) ile birleştirilir. .

Parametreler
test TestDescription : testi tanımlar

startTime long : System.currentTimeMillis() aracılığıyla ölçülen testin başladığı zaman