TestResultListener
  public
  
  
  abstract
  class
  TestResultListener
  
    extends Object
  
  
  
  
  
      implements
      
        ITestLifeCycleReceiver
      
  
  
| java.lang.Object | |
| ↳ | com.android.tradefed.result.TestResultListener | 
Yalnızca tek tek test sonuçlarıyla ilgilenen uygulayıcılar için ITestLifecycleListener'ın basitleştirilmiş hali.
Çeşitli yaşam döngüsü etkinliklerini testResult yöntemine göre filtreler.
ITestLifecycleListener etkinliklerinin sırayla alındığını varsayar.
Özet
| Herkese açık kurucular | |
|---|---|
| 
      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, Tek bir testin yürütülmesinin sonunu bildirir. | 
| 
        
        
        
        final
        
        void | 
      testEnded(TestDescription test, long endTime, Bitiş zamanını doğrudan belirtebildiğimiz  | 
| 
        
        
        
        final
        
        void | 
      testFailed(TestDescription test, String trace)
      Tek bir test durumunun başarısız olduğunu bildirir. | 
| 
        
        
        
        final
        
        void | 
      testIgnored(TestDescription test)
      Genellikle bir test yöntemi org.junit.Ignore ile eklendiği için test çalıştırılmadığında çağrılır. | 
| 
        abstract
        
        
        
        
        void | 
      testResult(TestDescription test, TestResult result)
       | 
| 
        
        
        
        
        
        void | 
      testRunEnded(long elapsedTimeMillis, Test çalıştırmasının sonunu bildirir. | 
| 
        
        
        
        
        
        void | 
      testSkipped(TestDescription test, SkipReason reason)
      Bir test atlandığında ve genellikle beklenmeyen bir nedenle yürütülmediğinde çağrılır. | 
| 
        
        
        
        final
        
        void | 
      testStarted(TestDescription test, long startTime)
      Doğru ölçüm için  | 
| 
        
        
        
        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 | 
testEnded
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 başarılıdır. 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 metriklerinERROR(/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 birlikte kullanın.
| Parametreler | |
|---|---|
| test | TestDescription: Testi tanımlar | 
| endTime | long:System.currentTimeMillis()aracılığıyla ölçülen, testin sona erdiği zaman | 
| testMetrics | : Yayınlanan metriklerinERROR(/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 | 
testIgnored
public final void testIgnored (TestDescription test)
Genellikle bir test yöntemi org.junit.Ignore ile eklendiği için test çalıştırılmadığında çağrılır.
| Parametreler | |
|---|---|
| test | TestDescription: Testi tanımlar | 
testResult
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)
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.
| 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 | 
