ProtoResultRaporter

public abstract class ProtoResultReporter
extends Object implements ITestInvocationListener , ILogSaverListener , ISupportGranularResults

java.lang.Nesne
com.android.tradefed.result.proto.ProtoResultReporter


Sonuç muhabiri, içindeki tüm sonuçlarla birlikte bir TestRecord oluşturur. processFinalProto(com.android.tradefed.result.proto.TestRecordProto.TestRecord) içindeki son protokolle ne yapılacağını işlemek için genişletilmelidir.

Özet

Kamu inşaatçıları

ProtoResultReporter ()

Genel yöntemler

final void invocationEnded (long elapsedTime)

Çağrının başarılı bir şekilde veya bir hata durumu nedeniyle sonlandırıldığını bildirir.

void invocationFailed ( FailureDescription failure)

Bazı hata koşulları nedeniyle tamamlanmamış bir çağrı bildirir.

void invocationFailed (Throwable cause)

Bazı hata koşulları nedeniyle tamamlanmamış bir çağrı bildirir.

final void invocationStarted ( IInvocationContext context)

Test çağırmanın başladığını bildirir.

final void logAssociation (String dataName, LogFile logFile)

Bazı durumlarda, günlüğün bir test senaryosu ile güçlü bir şekilde ilişkilendirilmesi gerekir, ancak bunu doğrudan testLogSaved(String, com.android.tradefed.result.LogDataType, com.android.tradefed.result.InputStreamSource, com.android.tradefed.result.LogFile) üzerinde yapma fırsatı testLogSaved(String, com.android.tradefed.result.LogDataType, com.android.tradefed.result.InputStreamSource, com.android.tradefed.result.LogFile) geri arama mümkün değil.

void processFinalInvocationLogs (TestRecordProto.TestRecord invocationLogs)

Çağrının tüm son günlüklerini birer birer göndermek için çağrı kaydını kullanın.

void processFinalProto (TestRecordProto.TestRecord finalRecord)

Tüm sonuçlarla birlikte son protokolün işlenmesi.

void processStartInvocation (TestRecordProto.TestRecord invocationStartRecord, IInvocationContext invocationContext)

invocationStarted(com.android.tradefed.invoker.IInvocationContext) gerçekleştikten sonra kısmi çağrı testi kaydı protokolünün işlenmesi.

void processTestCaseEnded (TestRecordProto.TestRecord testCaseRecord)

ERROR(/#testEnded(com.android.tradefed.result.TestDescription,long,HashMap)) oluştuktan sonra kesinleşmiş test senaryosu kaydı protokolünün işlenmesi.

void processTestCaseStarted (TestRecordProto.TestRecord testCaseStartedRecord)

testStarted(com.android.tradefed.result.TestDescription, long) gerçekleştikten sonra kısmi test senaryosu kaydı protokolünün işlenmesi.

void processTestModuleEnd (TestRecordProto.TestRecord moduleRecord)

testModuleEnded() meydana geldikten sonra kesinleşmiş modül kaydı protokolünün işlenmesi.

void processTestModuleStarted (TestRecordProto.TestRecord moduleStartRecord)

Kısmi modül kaydı protokolünün testModuleStarted(com.android.tradefed.invoker.IInvocationContext) oluştuktan sonra işlenmesi.

void processTestRunEnded (TestRecordProto.TestRecord runRecord, boolean moduleInProgress)

ERROR(/#testRunEnded(long,HashMap)) oluştuktan sonra sonlandırılmış çalıştırma kaydı protokolünün işlenmesi.

void processTestRunStarted (TestRecordProto.TestRecord runStartedRecord)

testRunStarted(String, int) gerçekleştikten sonra kısmi test çalıştırması kaydı protokolünün işlenmesi.

void setGranularResults (boolean granularResults)
void setInlineRecordOfChildren (boolean inline)
boolean supportGranularResults ()

Muhabir ayrıntılı sonuçları destekliyorsa True, aksi takdirde false döndürür.

final void testAssumptionFailure ( TestDescription test, String trace)

Bir atomik test, yanlış olan bir koşulu üstlendiğini işaretlediğinde çağrılır.

final void testAssumptionFailure ( TestDescription test, FailureDescription failure)

Bir atomik test, yanlış olan bir koşulu üstlendiğini işaretlediğinde çağrılır.

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

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

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

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

final void testFailed ( TestDescription test, FailureDescription failure)

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

final void testFailed ( TestDescription test, String trace)

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

final void testIgnored ( TestDescription test)

Genellikle bir test yöntemine org.junit.Ignore ile açıklama eklendiğinden, bir test çalıştırılmayacaksa çağrılır.

final void testModuleEnded ()

Bir modül çalıştırmasının sonunu bildirir.

final void testModuleStarted ( IInvocationContext moduleContext)

Çalışan bir modülün başlangıcını bildirir.

final void testRunEnded (long elapsedTimeMillis, runMetrics) testRunEnded (long elapsedTimeMillis, runMetrics)

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

final void testRunFailed ( FailureDescription failure)

Hata Açıklaması tarafından FailureDescription bir hata nedeniyle test çalıştırması tamamlanamadı.

final void testRunFailed (String errorMessage)

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

void testRunStarted (String runName, int testCount, int attemptNumber)

Bir test çalıştırmasının başladığını bildirir.

final void testRunStarted (String runName, int testCount)

Bir test çalıştırmasının başladığını bildirir.

void testRunStarted (String runName, int testCount, int attemptNumber, long startTime)

Bir test çalıştırmasının başladığını bildirir.

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

final void testStarted ( TestDescription test)

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

Korumalı yöntemler

TestRecordProto.ChildReference createModuleChildReference (TestRecordProto.TestRecord record)

Bir modül için bir alt referans oluşturur.

Kamu inşaatçıları

ProtoResultRaporter

public ProtoResultReporter ()

Genel yöntemler

çağrı Bitirildi

public final void invocationEnded (long elapsedTime)

Çağrının başarılı bir şekilde veya bir hata durumu nedeniyle sonlandırıldığını bildirir.

TradeFederation çerçevesi tarafından otomatik olarak çağrılır.

parametreler
elapsedTime long : çağrının ms cinsinden geçen süresi

çağırmaBaşarısız

public void invocationFailed (FailureDescription failure)

Bazı hata koşulları nedeniyle tamamlanmamış bir çağrı bildirir.

TradeFederation çerçevesi tarafından otomatik olarak çağrılır.

parametreler
failure FailureDescription : Arızanın nedenini açıklayan FailureDescription

çağırmaBaşarısız

public void invocationFailed (Throwable cause)

Bazı hata koşulları nedeniyle tamamlanmamış bir çağrı bildirir.

TradeFederation çerçevesi tarafından otomatik olarak çağrılır.

parametreler
cause Throwable : Throwable nedeni

çağrıBaşlatıldı

public final void invocationStarted (IInvocationContext context)

Test çağırmanın başladığını bildirir.

TradeFederation çerçevesi tarafından otomatik olarak çağrılır. Muhabirlerin, birden fazla cihaz raporlamasını desteklemek için bu yöntemi geçersiz kılması gerekir.

parametreler
context IInvocationContext : çağırma hakkında bilgi

logAssociation

public final void logAssociation (String dataName, 
                LogFile logFile)

Bazı durumlarda, günlüğün bir test senaryosu ile güçlü bir şekilde ilişkilendirilmesi gerekir, ancak bunu doğrudan testLogSaved(String, com.android.tradefed.result.LogDataType, com.android.tradefed.result.InputStreamSource, com.android.tradefed.result.LogFile) üzerinde yapma fırsatı testLogSaved(String, com.android.tradefed.result.LogDataType, com.android.tradefed.result.InputStreamSource, com.android.tradefed.result.LogFile) geri arama mümkün değil. Böylece, bu geri arama, açık bir şekilde güçlü bir ilişki sağlamaya izin verir.

parametreler
dataName String : Verinin adı

logFile LogFile : Daha önce günlüğe kaydedilen ve test senaryosu ile ilişkilendirilmesi gereken LogFile .

süreçSon Çağırma Günlükleri

public void processFinalInvocationLogs (TestRecordProto.TestRecord invocationLogs)

Çağrının tüm son günlüklerini birer birer göndermek için çağrı kaydını kullanın.

parametreler
invocationLogs TestRecordProto.TestRecord : Çağrıyı temsil eden kesinleşmiş protokol.

süreçSonProto

public void processFinalProto (TestRecordProto.TestRecord finalRecord)

Tüm sonuçlarla birlikte son protokolün işlenmesi.

parametreler
finalRecord TestRecordProto.TestRecord : Tüm çağırma sonuçlarını içeren kesinleştirilmiş protokol.

süreçBaşlatÇağırma

public void processStartInvocation (TestRecordProto.TestRecord invocationStartRecord, 
                IInvocationContext invocationContext)

invocationStarted(com.android.tradefed.invoker.IInvocationContext) gerçekleştikten sonra kısmi çağrı testi kaydı protokolünün işlenmesi.

parametreler
invocationStartRecord TestRecordProto.TestRecord : Başlatma çağrısından sonra doldurulan kısmi protokol.

invocationContext IInvocationContext : IInvocationContext çağrısı.

processTestCaseBitti

public void processTestCaseEnded (TestRecordProto.TestRecord testCaseRecord)

ERROR(/#testEnded(com.android.tradefed.result.TestDescription,long,HashMap)) oluştuktan sonra kesinleşmiş test senaryosu kaydı protokolünün işlenmesi.

parametreler
testCaseRecord TestRecordProto.TestRecord : Bir test senaryosunu temsil eden kesinleşmiş protokol.

processTestCaseBaşlatıldı

public void processTestCaseStarted (TestRecordProto.TestRecord testCaseStartedRecord)

testStarted(com.android.tradefed.result.TestDescription, long) gerçekleştikten sonra kısmi test senaryosu kaydı protokolünün işlenmesi.

parametreler
testCaseStartedRecord TestRecordProto.TestRecord : Test senaryosunu temsil eden kısmi proto.

processTestModuleEnd

public void processTestModuleEnd (TestRecordProto.TestRecord moduleRecord)

testModuleEnded() meydana geldikten sonra kesinleşmiş modül kaydı protokolünün işlenmesi.

parametreler
moduleRecord TestRecordProto.TestRecord : Modülü temsil eden kesinleşmiş protokol.

processTestModuleBaşladı

public void processTestModuleStarted (TestRecordProto.TestRecord moduleStartRecord)

Kısmi modül kaydı protokolünün testModuleStarted(com.android.tradefed.invoker.IInvocationContext) oluştuktan sonra işlenmesi.

parametreler
moduleStartRecord TestRecordProto.TestRecord : Modülü temsil eden kısmi protokol.

süreçTestÇalışmasıBitti

public void processTestRunEnded (TestRecordProto.TestRecord runRecord, 
                boolean moduleInProgress)

ERROR(/#testRunEnded(long,HashMap)) oluştuktan sonra sonlandırılmış çalıştırma kaydı protokolünün işlenmesi.

parametreler
runRecord TestRecordProto.TestRecord : Çalıştırmayı temsil eden sonlandırılmış proto.

moduleInProgress boolean : bir modülün devam edip etmediği.

süreçTestÇalışmasıBaşladı

public void processTestRunStarted (TestRecordProto.TestRecord runStartedRecord)

testRunStarted(String, int) gerçekleştikten sonra kısmi test çalıştırması kaydı protokolünün işlenmesi.

parametreler
runStartedRecord TestRecordProto.TestRecord : Çalıştırmayı temsil eden kısmi protokol.

setGranularResults

public void setGranularResults (boolean granularResults)

parametreler
granularResults boolean

setInlineRecordOfChildren

public void setInlineRecordOfChildren (boolean inline)

parametreler
inline boolean

supportGranularResults

public boolean supportGranularResults ()

Muhabir ayrıntılı sonuçları destekliyorsa True, aksi takdirde false döndürür.

İadeler
boolean

testVarsayımBaşarısızlık

public final void testAssumptionFailure (TestDescription test, 
                String trace)

Bir atomik test, yanlış olan bir koşulu üstlendiğini işaretlediğinde çağrılır.

parametreler
test TestDescription : testi tanımlar

trace String : başarısızlık yığın izi

testVarsayımBaşarısızlık

public final void testAssumptionFailure (TestDescription test, 
                FailureDescription failure)

Bir atomik test, yanlış olan bir koşulu üstlendiğini işaretlediğinde çağrılır.

parametreler
test TestDescription : testi tanımlar

failure FailureDescription : Arızayı ve bağlamını açıklayan FailureDescription .

testBitti

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

Bitiş zamanını doğrudan belirleyebileceğimiz ERROR(/#testEnded(com.android.tradefed.result.TestDescription,Map)) 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 süre

testMetrics : yayılan metriklerin bir ERROR(/Map)

testBitti

public void testEnded (TestDescription test, 
                 testMetrics)

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

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

parametreler
test TestDescription : testi tanımlar

testMetrics : yayılan metriklerin bir ERROR(/Map)

test başarısız

public final void testFailed (TestDescription test, 
                FailureDescription failure)

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

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

parametreler
test TestDescription : testi tanımlar

failure FailureDescription : Arızayı ve bağlamını açıklayan FailureDescription .

test başarısız

public final void testFailed (TestDescription test, 
                String trace)

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

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

parametreler
test TestDescription : testi tanımlar

trace String : başarısızlık yığın izi

testYoksayıldı

public final void testIgnored (TestDescription test)

Genellikle bir test yöntemine org.junit.Ignore ile açıklama eklendiğinden, bir test çalıştırılmayacaksa çağrılır.

parametreler
test TestDescription : testi tanımlar

testModuleBitti

public final void testModuleEnded ()

Bir modül çalıştırmasının sonunu bildirir.

testModuleBaşladı

public final void testModuleStarted (IInvocationContext moduleContext)

Çalışan bir modülün başlangıcını bildirir. Bu geri arama, testModuleEnded() ile ilişkilendirilir ve sırayla isteğe bağlıdır. Yalnızca modülleri kullanan bir koşu sırasında kullanılır: süit tabanlı koşucular.

parametreler
moduleContext IInvocationContext : modülün IInvocationContext .

testRunBitti

public final void testRunEnded (long elapsedTimeMillis, 
                 runMetrics)

Test çalıştırmasının sonunu bildirir. DÜZELTME: Farklı tipte iki Map<> arayüzümüz olamaz, bu yüzden burada HashMap kullanmamız gerekiyor.

parametreler
elapsedTimeMillis long : cihaz geçen süreyi milisaniye cinsinden bildirdi

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

testRunFailed

public final void testRunFailed (FailureDescription failure)

Hata Açıklaması tarafından FailureDescription bir hata nedeniyle test çalıştırması tamamlanamadı.

parametreler
failure FailureDescription : Arızayı ve bağlamını açıklayan FailureDescription .

testRunFailed

public final void testRunFailed (String errorMessage)

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

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

testÇalıştırıldı

public void testRunStarted (String runName, 
                int testCount, 
                int attemptNumber)

Bir test çalıştırmasının başladığını bildirir.

parametreler
runName String : test çalıştırması adı

testCount int : test çalıştırmasındaki toplam test sayısı

attemptNumber int : aynı runName'in birden çok kez çalıştırılan farklı denemelerini tanımlayan sipariş numarası. tryNumber 0 dizinlidir ve her yeni çalıştırma gerçekleştiğinde artmalıdır. örneğin, bir test ayrıntılı olarak 3 kez yeniden denenir, aynı runName altında toplam 4 çalıştırmaya sahip olmalıdır ve trialNumber 0 ile 3 arasında olmalıdır.

testÇalıştırıldı

public final void testRunStarted (String runName, 
                int testCount)

Bir test çalıştırmasının başladığını bildirir.

parametreler
runName String : test çalıştırması adı

testCount int : test çalıştırmasındaki toplam test sayısı

testÇalıştırıldı

public void testRunStarted (String runName, 
                int testCount, 
                int attemptNumber, 
                long startTime)

Bir test çalıştırmasının başladığını bildirir.

parametreler
runName String : test çalıştırması adı

testCount int : test çalıştırmasındaki toplam test sayısı

attemptNumber int : aynı runName'in birden çok kez çalıştırılan farklı denemelerini tanımlayan sipariş numarası. tryNumber 0 dizinlidir ve her yeni çalıştırma gerçekleştiğinde artmalıdır. örneğin, bir test ayrıntılı olarak 3 kez yeniden denenir, aynı runName altında toplam 4 çalıştırmaya sahip olmalıdır ve trialNumber 0 ile 3 arasında olmalıdır.

startTime long : System.currentTimeMillis() aracılığıyla ölçülen çalıştırmanın başladığı süre

testBaşladı

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

parametreler
test TestDescription : testi tanımlar

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

testBaşladı

public final void testStarted (TestDescription test)

Bireysel bir test vakasının 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

Korumalı yöntemler

createModuleChildReference

protected TestRecordProto.ChildReference createModuleChildReference (TestRecordProto.TestRecord record)

Bir modül için bir alt referans oluşturur.

parametreler
record TestRecordProto.TestRecord

İadeler
TestRecordProto.ChildReference