ProtoResultReporter
public abstract class ProtoResultReporter
extends Object
implements ITestInvocationListener , ILogSaverListener , ISupportGranularResults
java.lang.Object | |
↳ | com.android.tradefed.result.proto.ProtoResultReporter |
Sonuç raporlayıcısı, içindeki tüm sonuçları içeren bir TestRecord
protobuf'u oluşturur. processFinalProto(com.android.tradefed.result.proto.TestRecordProto.TestRecord)
içindeki son protokolle ne yapılacağını ele alacak şekilde genişletilmelidir.
Özet
Kamu inşaatçıları | |
---|---|
ProtoResultReporter () |
Genel yöntemler | |
---|---|
final void | invocationEnded (long elapsedTime) Başarılı bir şekilde veya bazı hata durumlarından dolayı çağrının sonlandırıldığını bildirir. |
void | invocationFailed ( FailureDescription failure) Bazı hata durumlarından dolayı tamamlanmamış bir çağrıyı bildirir. |
void | invocationFailed (Throwable cause) Bazı hata durumlarından dolayı tamamlanmamış bir çağrıyı 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üğün bir test durumuyla güçlü bir şekilde ilişkilendirilmesi gerekir, ancak bunu doğrudan |
void | processFinalInvocationLogs (TestRecordProto.TestRecord invocationLogs) Çağrının son günlüklerinin tamamını tek tek 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) |
void | processTestCaseEnded (TestRecordProto.TestRecord testCaseRecord) |
void | processTestCaseStarted (TestRecordProto.TestRecord testCaseStartedRecord) |
void | processTestModuleEnd (TestRecordProto.TestRecord moduleRecord) |
void | processTestModuleStarted (TestRecordProto.TestRecord moduleStartRecord) |
void | processTestRunEnded (TestRecordProto.TestRecord runRecord, boolean moduleInProgress) |
void | processTestRunStarted (TestRecordProto.TestRecord runStartedRecord) |
void | setGranularResults (boolean granularResults) |
void | setInlineRecordOfChildren (boolean inline) |
boolean | supportGranularResults () Muhabir ayrıntılı sonuçları destekliyorsa True değerini, aksi durumda false değerini döndürür. |
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 | testAssumptionFailure ( TestDescription test, FailureDescription failure) Bir atom testi, 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 |
void | testEnded ( TestDescription test, testMetrics) testEnded ( TestDescription test, testMetrics) Bireysel bir test senaryosunun yürütme sonunu bildirir. |
final void | testFailed ( TestDescription test, FailureDescription failure) Bireysel test senaryosunun başarısızlığını bildirir. |
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. |
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) |
final void | testRunFailed (String errorMessage) Önemli bir hata nedeniyle rapor test çalıştırması tamamlanamadı. |
void | testRunStarted (String runName, int testCount, int attemptNumber) Bir test çalıştırmasının başlangıcını bildirir. |
final void | testRunStarted (String runName, int testCount) Bir test çalıştırmasının başlangıcını bildirir. |
void | testRunStarted (String runName, int testCount, int attemptNumber, long startTime) Bir test çalıştırmasının başlangıcını bildirir. |
final void | testStarted ( TestDescription test, long startTime) Testin ne zaman başladığını da belirttiğimiz |
final void | testStarted ( TestDescription test) Bireysel bir test senaryosunun başlangıcını bildirir. |
Korumalı yöntemler | |
---|---|
TestRecordProto.ChildReference | createModuleChildReference (TestRecordProto.TestRecord record) Bir modül için alt başvuru oluşturur. |
Kamu inşaatçıları
ProtoResultReporter
public ProtoResultReporter ()
Genel yöntemler
çağırma sona erdi
public final void invocationEnded (long elapsedTime)
Başarılı bir şekilde 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 durumlarından dolayı tamamlanmamış bir çağrıyı bildirir.
TradeFederation çerçevesi tarafından otomatik olarak çağrılacaktır.
Parametreler | |
---|---|
failure | FailureDescription : Arızanın nedenini açıklayan FailureDescription |
çağrı başarısız oldu
public void invocationFailed (Throwable cause)
Bazı hata durumlarından dolayı tamamlanmamış bir çağrıyı 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. Muhabirlerin birden fazla cihaz raporlamasını desteklemek için bu yöntemi geçersiz kılmaları 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 durumuyla 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)
üzerinden 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ğildir. Böylece bu geri arama, güçlü bir ilişkilendirmenin açıkça sağlanmasına olanak tanır.
Parametreler | |
---|---|
dataName | String : Verinin adı |
logFile | LogFile : Daha önce günlüğe kaydedilen ve test durumuyla ilişkilendirilmesi gereken LogFile . |
süreçFinalInvokasyonGünlükleri
public void processFinalInvocationLogs (TestRecordProto.TestRecord invocationLogs)
Çağrının son günlüklerinin tamamını tek tek göndermek için çağrı kaydını kullanın.
Parametreler | |
---|---|
invocationLogs | TestRecordProto.TestRecord : Çağrıyı temsil eden sonlandırılmış protokol. |
süreçFinalProto
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 sonlandırılmış protokol. |
prosesStartInvokasyon
public void processStartInvocation (TestRecordProto.TestRecord invocationStartRecord, IInvocationContext invocationContext)
invocationStarted(com.android.tradefed.invoker.IInvocationContext)
oluştuktan sonra kısmi çağırma test kaydı protokolünün işlenmesi.
Parametreler | |
---|---|
invocationStartRecord | TestRecordProto.TestRecord : invokasyonStart'tan sonra doldurulan kısmi protokol. |
invocationContext | IInvocationContext : Çağrı IInvocationContext . |
süreçTestCaseEnded
public void processTestCaseEnded (TestRecordProto.TestRecord testCaseRecord)
ERROR(/#testEnded(com.android.tradefed.result.TestDescription,long,HashMap))
oluştuktan sonra kesinleşmiş test senaryosu kayıt protokolünün işlenmesi.
Parametreler | |
---|---|
testCaseRecord | TestRecordProto.TestRecord : Bir test senaryosunu temsil eden sonlandırılmış protokol. |
süreçTestCaseBaşladı
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 protokol. |
süreçTestModuleEnd
public void processTestModuleEnd (TestRecordProto.TestRecord moduleRecord)
testModuleEnded()
oluştuktan sonra sonlandırılmış modül kayıt protokolünün işlenmesi.
Parametreler | |
---|---|
moduleRecord | TestRecordProto.TestRecord : Modülü temsil eden sonlandırılmış protokol. |
süreçTestModuleStarted
public void processTestModuleStarted (TestRecordProto.TestRecord moduleStartRecord)
testModuleStarted(com.android.tradefed.invoker.IInvocationContext)
oluştuktan sonra kısmi modül kaydı protokolünün işlenmesi.
Parametreler | |
---|---|
moduleStartRecord | TestRecordProto.TestRecord : Modülü temsil eden kısmi protokol. |
süreçTestRunEnded
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ış protokol. |
moduleInProgress | boolean : Bir modülün devam edip etmediği. |
süreçTestRunBaşlatıldı
public void processTestRunStarted (TestRecordProto.TestRecord runStartedRecord)
testRunStarted(String, int)
oluştuktan sonra kısmi test çalıştırması kayıt protokolünün işlenmesi.
Parametreler | |
---|---|
runStartedRecord | TestRecordProto.TestRecord : Çalıştırmayı temsil eden kısmi protokol. |
setAnahtarlıSonuçlar
public void setGranularResults (boolean granularResults)
Parametreler | |
---|---|
granularResults | boolean |
setInlineRecordOfChildren
public void setInlineRecordOfChildren (boolean inline)
Parametreler | |
---|---|
inline | boolean |
destekAyrıntılıSonuçlar
public boolean supportGranularResults ()
Muhabir ayrıntılı sonuçları destekliyorsa True değerini, aksi durumda false değerini döndürür.
İadeler | |
---|---|
boolean |
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 |
testVarsayımBaşarısızlık
public final void testAssumptionFailure (TestDescription test, FailureDescription failure)
Bir atom testi, yanlış olan bir koşulu varsaydığını işaretlediğinde çağrılır
Parametreler | |
---|---|
test | TestDescription : testi tanımlar |
failure | FailureDescription : Arızayı ve içeriğini açıklayan FailureDescription . |
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 | ERROR(/Map) |
testSonlandı
public 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 | ERROR(/Map) |
test başarısız
public final void testFailed (TestDescription test, FailureDescription failure)
Bireysel test senaryosunun başarısızlığını bildirir.
testStarted ve testEnded arasında çağrılacaktır.
Parametreler | |
---|---|
test | TestDescription : testi tanımlar |
failure | FailureDescription : Arızayı ve içeriğini açıklayan FailureDescription . |
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 |
testModuleEnded
public final void testModuleEnded ()
Bir modül çalıştırmasının sonunu bildirir.
testModuleStarted
public final void testModuleStarted (IInvocationContext moduleContext)
Çalışan bir modülün başlangıcını bildirir. Bu geri çağırma testModuleEnded()
ile ilişkilidir ve dizide isteğe bağlıdır. Yalnızca modülleri kullanan bir çalıştırma 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ış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. |
testRun Başarısız
public final void testRunFailed (FailureDescription failure)
FailureDescription
tarafından açıklanan bir hata nedeniyle rapor test çalıştırması tamamlanamadı.
Parametreler | |
---|---|
failure | FailureDescription : Arızayı ve içeriğini açıklayan FailureDescription . |
testRun Başarısız
public final void testRunFailed (String errorMessage)
Önemli bir hata nedeniyle rapor test çalıştırması tamamlanamadı.
Parametreler | |
---|---|
errorMessage | String : Çalıştırma hatasının nedenini açıklayan String . |
testRunBaşlatıldı
public void testRunStarted (String runName, int testCount, int attemptNumber)
Bir test çalıştırmasının başlangıcı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ı girişimlerini tanımlayan sipariş numarası. tryNumber 0 indekslidir ve her yeni çalıştırma gerçekleştiğinde artmalıdır. Örneğin, bir test 3 kez ayrıntılı olarak yeniden denenir, aynı runName altında toplam 4 çalıştırmaya sahip olmalıdır ve tryNumber değeri 0'dan 3'e kadar olmalıdır. |
testRunBaşlatıldı
public final void testRunStarted (String runName, int testCount)
Bir test çalıştırmasının başlangıcını bildirir.
Parametreler | |
---|---|
runName | String : test çalıştırması adı |
testCount | int : test çalıştırmasındaki toplam test sayısı |
testRunBaşlatıldı
public void testRunStarted (String runName, int testCount, int attemptNumber, long startTime)
Bir test çalıştırmasının başlangıcı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ı girişimlerini tanımlayan sipariş numarası. tryNumber 0 indekslidir ve her yeni çalıştırma gerçekleştiğinde artmalıdır. Örneğin, bir test 3 kez ayrıntılı olarak yeniden denenir, aynı runName altında toplam 4 çalıştırmaya sahip olmalıdır ve tryNumber değeri 0'dan 3'e kadar olmalıdır. |
startTime | long : Çalıştırmanın başladığı saat, System.currentTimeMillis() aracılığıyla ölçülür |
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 birleştirilir. .
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 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 |
Korumalı yöntemler
createModuleChildReference
protected TestRecordProto.ChildReference createModuleChildReference (TestRecordProto.TestRecord record)
Bir modül için alt başvuru oluşturur.
Parametreler | |
---|---|
record | TestRecordProto.TestRecord |
İadeler | |
---|---|
TestRecordProto.ChildReference |