ProtoResultParser
public
class
ProtoResultParser
extends Object
java.lang.Object | |
↳ | com.android.tradefed.result.proto.ProtoResultParser |
Parser untuk format proto hasil Tradefed.
Ringkasan
Class bertingkat | |
---|---|
enum |
ProtoResultParser.TestLevel
Enumerasi yang mewakili level proto saat ini yang sedang diproses. |
Konstruktor publik | |
---|---|
ProtoResultParser(ITestInvocationListener listener, IInvocationContext context, boolean reportInvocation)
Ctor. |
|
ProtoResultParser(ITestInvocationListener listener, IInvocationContext context, boolean reportInvocation, String prefixForFile)
Ctor. |
Metode publik | |
---|---|
void
|
completeModuleEvents()
Jika diperlukan untuk memastikan pelaporan yang konsisten, selesaikan peristiwa modul. |
String
|
getModuleInProgress()
Menampilkan ID modul yang sedang berlangsung. |
boolean
|
hasInvocationFailed()
Menampilkan apakah pemanggilan yang gagal telah dilaporkan atau tidak. |
boolean
|
invocationEndedReached()
Menampilkan apakah penguraian mencapai akhir pemanggilan atau tidak. |
void
|
processFileProto(File protoFile)
Jika mengurai file proto secara langsung, tangani penguraian langsung sebagai urutan. |
void
|
processFinalizedProto(TestRecordProto.TestRecord finalProto)
Fungsi entri utama yang mengambil proto yang telah selesai dan memutar ulang hasilnya. |
ProtoResultParser.TestLevel
|
processNewProto(TestRecordProto.TestRecord currentProto)
Fungsi entri utama tempat setiap proto ditampilkan untuk diuraikan menjadi peristiwa Tradefed. |
void
|
setQuiet(boolean quiet)
Menetapkan apakah akan mencetak atau tidak saat peristiwa diterima. |
void
|
setReportLogs(boolean reportLogs)
Menetapkan apakah kita harus melaporkan log atau tidak. |
Konstruktor publik
ProtoResultParser
public ProtoResultParser (ITestInvocationListener listener, IInvocationContext context, boolean reportInvocation)
Ctor.
Parameter | |
---|---|
listener |
ITestInvocationListener |
context |
IInvocationContext |
reportInvocation |
boolean |
ProtoResultParser
public ProtoResultParser (ITestInvocationListener listener, IInvocationContext context, boolean reportInvocation, String prefixForFile)
Ctor.
Parameter | |
---|---|
listener |
ITestInvocationListener |
context |
IInvocationContext |
reportInvocation |
boolean |
prefixForFile |
String |
Metode publik
completeModuleEvents
public void completeModuleEvents ()
Jika diperlukan untuk memastikan pelaporan yang konsisten, selesaikan peristiwa modul.
getModuleInProgress
public String getModuleInProgress ()
Menampilkan ID modul yang sedang berlangsung. Menampilkan null jika tidak ada yang sedang berlangsung.
Hasil | |
---|---|
String |
hasInvocationFailed
public boolean hasInvocationFailed ()
Menampilkan apakah pemanggilan yang gagal telah dilaporkan atau tidak.
Hasil | |
---|---|
boolean |
invocationEndedReached
public boolean invocationEndedReached ()
Menampilkan apakah penguraian mencapai akhir pemanggilan atau tidak.
Hasil | |
---|---|
boolean |
processFileProto
public void processFileProto (File protoFile)
Jika mengurai file proto secara langsung, tangani penguraian langsung sebagai urutan.
Dikaitkan dengan FileProtoResultReporter
saat melaporkan urutan file.
Parameter | |
---|---|
protoFile |
File : File proto yang akan diuraikan. |
processFinalizedProto
public void processFinalizedProto (TestRecordProto.TestRecord finalProto)
Fungsi entri utama yang mengambil proto yang telah selesai dan memutar ulang hasilnya.
Parameter | |
---|---|
finalProto |
TestRecordProto.TestRecord : TestRecord akhir yang akan diuraikan.
|
processNewProto
public ProtoResultParser.TestLevel processNewProto (TestRecordProto.TestRecord currentProto)
Fungsi entri utama tempat setiap proto ditampilkan untuk diuraikan menjadi peristiwa Tradefed.
Parameter | |
---|---|
currentProto |
TestRecordProto.TestRecord : TestRecord saat ini yang akan diuraikan. |
Hasil | |
---|---|
ProtoResultParser.TestLevel |
Benar jika proto yang diproses adalah modul. |
setQuiet
public void setQuiet (boolean quiet)
Menetapkan apakah akan mencetak atau tidak saat peristiwa diterima.
Parameter | |
---|---|
quiet |
boolean |
setReportLogs
public void setReportLogs (boolean reportLogs)
Menetapkan apakah kita harus melaporkan log atau tidak.
Parameter | |
---|---|
reportLogs |
boolean |