Google berkomitmen untuk mendorong terwujudnya keadilan ras bagi komunitas Kulit Hitam. Lihat caranya.

ProtoResultParser

public class ProtoResultParser
extends Object

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


Parser untuk format proto hasil Tradefed.

Ringkasan

Kelas bersarang

enum ProtoResultParser.TestLevel

Enumerasi mewakili tingkat proto saat ini yang sedang diproses.

Konstruktor publik

ProtoResultParser (ITestInvocationListener listener, IInvocationContext context, boolean reportInvocation)

Ktor.

ProtoResultParser (ITestInvocationListener listener, IInvocationContext context, boolean reportInvocation, String prefixForFile)

Ktor.

Metode publik

void completeModuleEvents ()

Jika diperlukan untuk memastikan pelaporan yang konsisten, selesaikan peristiwa modul.

String getModuleInProgress ()

Mengembalikan id modul yang sedang berlangsung.

boolean hasInvocationFailed ()

Mengembalikan apakah pemanggilan gagal telah dilaporkan atau tidak.

boolean invocationEndedReached ()

Mengembalikan apakah penguraian mencapai permintaan berakhir atau tidak.

void processFileProto (File protoFile)

Dalam hal mem-parsing file proto secara langsung, tangani parsing langsung sebagai urutan.

void processFinalizedProto (TestRecordProto.TestRecord finalProto)

Fungsi entri utama yang mengambil proto yang telah diselesaikan dan memutar ulang hasilnya.

ProtoResultParser.TestLevel processNewProto (TestRecordProto.TestRecord currentProto)

Fungsi entri utama di mana setiap proto disajikan untuk diuraikan ke dalam acara Tradefed.

void setQuiet (boolean quiet)

Menyetel apakah akan mencetak atau tidak saat acara diterima.

void setReportLogs (boolean reportLogs)

Menyetel apakah kita harus melaporkan log atau tidak.

Konstruktor publik

ProtoResultParser

public ProtoResultParser (ITestInvocationListener listener, 
                IInvocationContext context, 
                boolean reportInvocation)

Ktor.

Parameter
listener ITestInvocationListener

context IInvocationContext

reportInvocation boolean

ProtoResultParser

public ProtoResultParser (ITestInvocationListener listener, 
                IInvocationContext context, 
                boolean reportInvocation, 
                String prefixForFile)

Ktor.

Parameter
listener ITestInvocationListener

context IInvocationContext

reportInvocation boolean

prefixForFile String

Metode publik

SelesaiModulAcara

public void completeModuleEvents ()

Jika diperlukan untuk memastikan pelaporan yang konsisten, selesaikan peristiwa modul.

getModuleInProgress

public String getModuleInProgress ()

Mengembalikan id modul yang sedang berlangsung. Mengembalikan null jika tidak ada yang sedang berlangsung.

Kembali
String

memilikiInvokasiGagal

public boolean hasInvocationFailed ()

Mengembalikan apakah pemanggilan gagal telah dilaporkan atau tidak.

Kembali
boolean

doaEndedReached

public boolean invocationEndedReached ()

Mengembalikan apakah penguraian mencapai permintaan berakhir atau tidak.

Kembali
boolean

prosesFileProto

public void processFileProto (File protoFile)

Dalam hal mem-parsing file proto secara langsung, tangani parsing langsung sebagai urutan. Terkait dengan FileProtoResultReporter ketika melaporkan urutan file.

Parameter
protoFile File : File proto dapat dipecah.

prosesSelesaiProto

public void processFinalizedProto (TestRecordProto.TestRecord finalProto)

Fungsi entri utama yang mengambil proto yang telah diselesaikan dan memutar ulang hasilnya.

Parameter
finalProto TestRecordProto.TestRecord : The akhir TestRecord dapat dipecah.

prosesProtoBaru

public ProtoResultParser.TestLevel processNewProto (TestRecordProto.TestRecord currentProto)

Fungsi entri utama di mana setiap proto disajikan untuk diuraikan ke dalam acara Tradefed.

Parameter
currentProto TestRecordProto.TestRecord : Arus TestRecord dapat dipecah.

Kembali
ProtoResultParser.TestLevel Benar jika proto yang diproses adalah modul.

setTenang

public void setQuiet (boolean quiet)

Menyetel apakah akan mencetak atau tidak saat acara diterima.

Parameter
quiet boolean

setLaporkanLog

public void setReportLogs (boolean reportLogs)

Menyetel apakah kita harus melaporkan log atau tidak.

Parameter
reportLogs boolean