ProtoSonuç Raporlayıcısı

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

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


Sonuç raporlayıcı, içindeki tüm sonuçları içeren bir TestRecord protobuf 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)

Başarıyla veya bazı hata durumlarından dolayı çağrının 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ğrısının başlangıcını bildirir.

final void logAssociation (String dataName, LogFile logFile)

Bazı durumlarda, günlük bir test senaryolarıyla güçlü bir şekilde ilişkilendirilmelidir, 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 çağırma mümkün değildir.

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)

Son protokolün tüm sonuçlarla birlikte işlenmesi.

void processStartInvocation (TestRecordProto.TestRecord invocationStartRecord, IInvocationContext invocationContext)

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

void processTestCaseEnded (TestRecordProto.TestRecord testCaseRecord)

ERROR(/#testEnded(com.android.tradefed.result.TestDescription,long,HashMap)) oluştuktan sonra nihai test senaryosu kayıt 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() gerçekleştikten sonra sonlandırılmış modül kayıt protokolünün işlenmesi.

void processTestModuleStarted (TestRecordProto.TestRecord moduleStartRecord)

testModuleStarted(com.android.tradefed.invoker.IInvocationContext) gerçekleştikten sonra kısmi modül kaydı protokolünün 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) oluştuktan sonra kısmi test çalışması 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 halde false döndürür.

final void testAssumptionFailure ( TestDescription test, String trace)

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

final void testAssumptionFailure ( TestDescription test, FailureDescription failure)

Bir atomik test, yanlış olan bir koşulu varsaydığını 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 belirtebileceğimiz ERROR(/#testEnded(com.android.tradefed.result.TestDescription,Map)) yerine 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öntemi org.junit.Ignore ile açıklamalı olduğundan, bir test çalıştırılmadığında çağrılır.

final void testModuleEnded ()

Bir modülün çalışması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ışmasının sonunu bildirir.

final void testRunFailed ( FailureDescription failure)

Reports test çalıştırması, FailureDescription tarafından tanımlanan bir hata nedeniyle tamamlanamadı.

final void testRunFailed (String errorMessage)

Raporlar test çalıştırması, önemli bir hata nedeniyle tamamlanamadı.

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

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

final void testRunStarted (String runName, int testCount)

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

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

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

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) yöntemine alternatif .

final void testStarted ( TestDescription test)

Tek bir test senaryosunun 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

ProtoSonuç Raporlayıcısı

public ProtoResultReporter ()

Genel yöntemler

Çağrı Sona Erdi

public final void invocationEnded (long elapsedTime)

Başarıyla veya bazı hata durumlarından dolayı çağrının sonlandırıldığını bildirir.

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

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

çağrı başarısız oldu

public void invocationFailed (FailureDescription failure)

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

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

parametreler
failure FailureDescription : hatanın nedenini açıklayan FailureDescription

çağrı başarısız oldu

public void invocationFailed (Throwable cause)

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

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

parametreler
cause Throwable : başarısızlığın Throwable nedeni

çağrı başlatıldı

public final void invocationStarted (IInvocationContext context)

Test çağrısının başlangıcını bildirir.

TradeFederation çerçevesi tarafından otomatik olarak çağrılacaktır. Raporlayıcıların, birden fazla cihaz raporlamasını desteklemek için bu yöntemi geçersiz kılmaları gerekir.

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

logAssociation

public final void logAssociation (String dataName, 
                LogFile logFile)

Bazı durumlarda, günlük bir test senaryolarıyla güçlü bir şekilde ilişkilendirilmelidir, 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 çağırma mümkün değildir. Böylece, bu geri arama açıkça güçlü bir ilişkilendirme sağlamaya izin verir.

parametreler
dataName String : Verinin adı

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

processFinalInvocationLogs

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 sonlandırılmış proto.

süreçFinalProto

public void processFinalProto (TestRecordProto.TestRecord finalRecord)

Son protokolün tüm sonuçlarla birlikte işlenmesi.

parametreler
finalRecord TestRecordProto.TestRecord : Tüm başlatma sonuçlarını içeren sonlandırılmış proto.

processStartÇağrı

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

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

parametreler
invocationStartRecord TestRecordProto.TestRecord : invocationStart'tan sonra doldurulan kısmi proto.

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

processTestCaseEnded

public void processTestCaseEnded (TestRecordProto.TestRecord testCaseRecord)

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

parametreler
testCaseRecord TestRecordProto.TestRecord : Bir test senaryosunu temsil eden sonlandırılmış proto.

processTestCaseStarted

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() gerçekleştikten sonra sonlandırılmış modül kayıt protokolünün işlenmesi.

parametreler
moduleRecord TestRecordProto.TestRecord : Modülü temsil eden sonlandırılmış proto.

processTestModuleStarted

public void processTestModuleStarted (TestRecordProto.TestRecord moduleStartRecord)

testModuleStarted(com.android.tradefed.invoker.IInvocationContext) gerçekleştikten sonra kısmi modül kaydı protokolünün işlenmesi.

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

processTestRunEnded

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.

processTestRunStarted

public void processTestRunStarted (TestRecordProto.TestRecord runStartedRecord)

testRunStarted(String, int) oluştuktan sonra kısmi test çalışması kaydı protokolünün işlenmesi.

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

setGranularResults

public void setGranularResults (boolean granularResults)

parametreler
granularResults boolean

setInlineRecordOfChildren

public void setInlineRecordOfChildren (boolean inline)

parametreler
inline boolean

destekGranülerSonuçlar

public boolean supportGranularResults ()

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

İadeler
boolean

test Varsayım Başarısızlığı

public final void testAssumptionFailure (TestDescription test, 
                String trace)

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

test Varsayım Başarısızlığı

public final void testAssumptionFailure (TestDescription test, 
                FailureDescription failure)

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

parametreler
test TestDescription : testi tanımlar

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

test Bitti

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

Bitiş zamanını doğrudan belirtebileceğimiz ERROR(/#testEnded(com.android.tradefed.result.TestDescription,Map)) yerine 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 metriklerde bir ERROR(/Map)

test Bitti

public void testEnded (TestDescription test, 
                 testMetrics)

Tek 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 anahtar/değer ölçümlerini de döndürür.

parametreler
test TestDescription : testi tanımlar

testMetrics : yayılan metriklerde 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ılacak.

parametreler
test TestDescription : testi tanımlar

failure FailureDescription : Hatayı ve içeriğini 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ılacak.

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 açıklamalı olduğundan, bir test çalıştırılmadığında çağrılır.

parametreler
test TestDescription : testi tanımlar

testModuleEnded

public final void testModuleEnded ()

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

testModuleStarted

public final void testModuleStarted (IInvocationContext moduleContext)

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

parametreler
moduleContext IInvocationContext : modülün IInvocationContext .

testRunEnded

public final void testRunEnded (long elapsedTimeMillis, 
                 runMetrics)

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

parametreler
elapsedTimeMillis long : cihazın milisaniye cinsinden geçen süreyi bildirdiği

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

testRunFailed

public final void testRunFailed (FailureDescription failure)

Reports test çalıştırması, FailureDescription tarafından tanımlanan bir hata nedeniyle tamamlanamadı.

parametreler
failure FailureDescription : Hatayı ve içeriğini açıklayan FailureDescription .

testRunFailed

public final void testRunFailed (String errorMessage)

Raporlar test çalıştırması, önemli bir hata nedeniyle tamamlanamadı.

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

testÇalıştırBaşlatıldı

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

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

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

testCount int : test çalışmasında toplam test sayısı

attemptNumber int : birden çok kez çalışan aynı runName'in farklı denemelerini tanımlayan sipariş numarası. GirişimNumarası 0 dizinlidir ve her yeni çalıştırma gerçekleştiğinde artması gerekir. örneğin, bir test 3 kez parçalı olarak yeniden denenir, aynı çalıştırmaAdı altında toplam 4 çalıştırması olmalıdır ve denemeNumarası 0 ile 3 arasındadır.

testÇalıştırBaşlatıldı

public final void testRunStarted (String runName, 
                int testCount)

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

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

testCount int : test çalışmasında toplam test sayısı

testÇalıştırBaşlatıldı

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

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

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

testCount int : test çalışmasında toplam test sayısı

attemptNumber int : birden çok kez çalışan aynı runName'in farklı denemelerini tanımlayan sipariş numarası. GirişimNumarası 0 dizinlidir ve her yeni çalıştırma gerçekleştiğinde artması gerekir. örneğin, bir test 3 kez parçalı olarak yeniden denenir, aynı çalıştırmaAdı altında toplam 4 çalıştırması olmalıdır ve denemeNumarası 0 ile 3 arasındadır.

startTime long : çalıştırmanın başladığı zaman, System.currentTimeMillis() aracılığıyla ölçülür

test baş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) yöntemine alternatif .

parametreler
test TestDescription : testi tanımlar

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

test başladı

public final void testStarted (TestDescription test)

Tek bir test senaryosunun başlangıcını bildirir. Daha 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

createModuleChildReferans

protected TestRecordProto.ChildReference createModuleChildReference (TestRecordProto.TestRecord record)

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

parametreler
record TestRecordProto.TestRecord

İadeler
TestRecordProto.ChildReference