TestSonucuDinleyici

public abstract class TestResultListener
extends Object implements ITestLifeCycleReceiver

java.lang.Object
com.android.tradefed.result.TestResultListener


Yalnızca bireysel test sonuçlarına önem veren uygulayıcılar için ITestLifecycleListener'ın basitleştirilmesi.

Çeşitli yaşam döngüsü olaylarını bir testResult yöntemine kadar filtreler.

İş parçacığı açısından güvenli DEĞİLDİR ve özellikle ITestLifecycleListener olaylarının sırayla alındığını varsayar.

Özet

Kamu inşaatçıları

TestResultListener ()

Genel yöntemler

final void testAssumptionFailure ( TestDescription test, String trace)

Bir atom testi, yanlış olan bir koşulu varsaydığını işaretlediğinde çağrılır

final void testEnded ( TestDescription test, testMetrics) testEnded ( TestDescription test, testMetrics)

Bireysel bir test senaryosunun yürütme sonunu bildirir.

final 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.

final void testFailed ( TestDescription test, String trace)

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

final void testIgnored ( TestDescription test)

Genellikle bir test yönteminin org.junit.Ignore ile açıklanması nedeniyle bir test çalıştırılmayacağı zaman çağrılır.

abstract void testResult ( TestDescription test, TestResult result)
void testRunEnded (long elapsedTimeMillis, runMetrics) testRunEnded (long elapsedTimeMillis, runMetrics)

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

void testSkipped ( TestDescription test, SkipReason reason)

Bir test atlandığında ve genellikle beklenmeyen bir nedenden dolayı yürütülmediğinde çağrılır.

final void testStarted ( TestDescription test, long startTime)

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

final void testStarted ( TestDescription test)

Bireysel bir test senaryosunun başlangıcını bildirir.

Kamu inşaatçıları

TestSonucuDinleyici

public TestResultListener ()

Genel yöntemler

testVarsayımBaşarısızlık

public final void testAssumptionFailure (TestDescription test, 
                String trace)

Bir atom testi, yanlış olan bir koşulu varsaydığını işaretlediğinde çağrılır

Parametreler
test TestDescription : testi tanımlar

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

testSonlandı

public final void testEnded (TestDescription test, 
                 testMetrics)

Bireysel bir test senaryosunun yürütme sonunu bildirir.

testFailed(TestDescription, FailureDescription) çağrılmadıysa bu test başarılı oldu. Ayrıca test senaryosunun yürütülmesi sırasında yayılmış olabilecek tüm anahtar/değer ölçümlerini de döndürür.

Parametreler
test TestDescription : testi tanımlar

testMetrics : yayılan metriklerin ERROR(/Map)

testSonlandı

public final 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 final 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

testYoksayıldı

public final void testIgnored (TestDescription test)

Genellikle bir test yönteminin org.junit.Ignore ile açıklanması nedeniyle bir test çalıştırılmayacağı zaman çağrılır.

Parametreler
test TestDescription : testi tanımlar

test sonucu

public abstract void testResult (TestDescription test, 
                TestResult result)

Parametreler
test TestDescription

result TestResult

testRunEnded

public void testRunEnded (long elapsedTimeMillis, 
                 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
elapsedTimeMillis 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.

testAtlandı

public void testSkipped (TestDescription test, 
                SkipReason reason)

Bir test atlandığında ve genellikle beklenmeyen bir nedenden dolayı yürütülmediğinde çağrılır. Bu testler, uygun bir yürütme elde etmek için yeniden denenmeye çalışılacaktır.

Parametreler
test TestDescription : testi tanımlar

reason SkipReason : SkipReason

testBaşladı

public final void testStarted (TestDescription test, 
                long startTime)

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

Parametreler
test TestDescription : testi tanımlar

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

testBaşladı

public final void testStarted (TestDescription test)

Bireysel bir test senaryosunun başlangıcını bildirir. Eski arayüz, mümkün olduğunda testStarted(com.android.tradefed.result.TestDescription) kullanmalıdır.

Parametreler
test TestDescription : testi tanımlar