TestResultListener

public abstract class TestResultListener
extends Object implements ITestLifeCycleReceiver

java.lang.Nesne
   ↳ com.android.tradefed.result.TestResultListener


Yalnızca bireysel test sonuçlarıyla ilgilenen uygulamalar için ITestLifecycleListener'ın bir sadeleştirilmesi.

Çeşitli yaşam döngüsü etkinliklerini testResult yöntemine göre filtreler.

ITestLifecycleListener etkinliklerinin sırayla alındığını varsayar.

Özet

Kamu inşaatçıları

TestResultListener()

Herkese açık yöntemler

final void testAssumptionFailure(TestDescription test, String trace)

Bir atomik test, yanlış bir koşulu varsaydığını işaretlediğinde çağrılır

final void testEnded(TestDescription test, testMetrics)

Tek bir testin yürütülmesinin sonunu bildirir.

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

Bitiş zamanını doğrudan belirtebildiğimiz ERROR(/#testEnded(com.android.tradefed.result.TestDescription,Map))'e alternatif.

final void testFailed(TestDescription test, String trace)

Tek bir test durumunun başarısız olduğunu bildirir.

final void testIgnored(TestDescription test)

Genellikle test yöntemi org.junit.Yoksay şeklinde notlandırıldığından, test çalıştırılmayacaksa çağrılır.

abstract void testResult(TestDescription test, TestResult result)
void 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 kullanıldığında, testin ne zaman başlatıldığını da belirttiğimiz testStarted(com.android.tradefed.result.TestDescription)'e alternatiftir.

final void testStarted(TestDescription test)

Tek bir testin başlangıcını bildirir.

Herkese açık kurucular

TestResultListener

public TestResultListener ()

Herkese açık yöntemler

testAssumptionFailure

public final void testAssumptionFailure (TestDescription test, 
                String trace)

Bir atomik test, yanlış 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

testSona Erdi

public final void testEnded (TestDescription test, 
                 testMetrics)

Tek bir testin yürütülmesinin sonunu bildirir.

testFailed(TestDescription, FailureDescription) çağrılmadıysa bu test geçmiştir. Ayrıca, test senaryosunun yürütülmesi sırasında yayınlanmış olabilecek tüm anahtar/değer metriklerini döndürür.

Parametreler
test TestDescription: Testi tanımlar

testMetrics : Yayınlanan metriklerin ERROR(/Map)

testEnded

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

Bitiş zamanını doğrudan belirtebildiğimiz ERROR(/#testEnded(com.android.tradefed.result.TestDescription,Map))'e alternatif. 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 zaman

testMetrics : Yayınlanan metriklerin ERROR(/Map)

testFailed

public final void testFailed (TestDescription test, 
                String trace)

Tek bir test durumunun başarısız olduğunu bildirir.

testStarted ve testEnded arasında çağrılı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öntemi org.junit.Ignore ile eklendiği için bir test çalıştırılmadığında çağrılır.

Parametreler
test TestDescription: Testi tanımlar

testSonucu

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.

Parametreler
elapsedTimeMillis long: Cihaz tarafından bildirilen geçen süre (milisaniye cinsinden)

runMetrics : Test çalışmasının sonunda raporlanan anahtar/değer çiftleri

testSkipped

public void testSkipped (TestDescription test, 
                SkipReason reason)

Bir test atlandığında ve genellikle beklenmeyen bir nedenle yürütülmediğinde çağrılır. Doğru bir yürütme elde etmek için bu testlerin tekrar denenmesi denenir.

Parametreler
test TestDescription: Testi tanımlar

reason SkipReason: SkipReason

testStarted

public final void testStarted (TestDescription test, 
                long startTime)

Testin başlatıldığı zamanı da belirttiğimiz testStarted(com.android.tradefed.result.TestDescription) yerine doğru ölçüm için ERROR(/#testEnded(com.android.tradefed.result.TestDescription,long,Map)) ile birlikte kullanılır.

Parametreler
test TestDescription: Testi tanımlar

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

testStarted

public final void testStarted (TestDescription test)

Tek bir testin başlangıcını bildirir. Eski arayüz. Mümkün olduğunda testStarted(com.android.tradefed.result.TestDescription) kullanılmalıdır.

Parametreler
test TestDescription: Testi tanımlar