ProtoResultReporter

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

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


Trình báo cáo kết quả tạo một protobuf TestRecord với tất cả kết quả bên trong. Nên được mở rộng để xử lý việc cần làm với proto cuối cùng trong processFinalProto(com.android.tradefed.result.proto.TestRecordProto.TestRecord).

Tóm tắt

Hàm khởi tạo công khai

ProtoResultReporter()

Phương thức công khai

final void invocationEnded(long elapsedTime)
void invocationFailed(FailureDescription failure)
void invocationFailed(Throwable cause)
final void invocationStarted(IInvocationContext context)
final void logAssociation(String dataName, LogFile logFile)
void processFinalProto(TestRecordProto.TestRecord finalRecord)

Xử lý proto cuối cùng với tất cả kết quả.

void processStartInvocation(TestRecordProto.TestRecord invocationStartRecord, IInvocationContext invocationContext)

Xử lý proto bản ghi kiểm thử lệnh gọi một phần sau khi invocationStarted(com.android.tradefed.invoker.IInvocationContext) xảy ra.

void processTestCaseEnded(TestRecordProto.TestRecord testCaseRecord)

Xử lý proto bản ghi trường hợp kiểm thử đã hoàn tất sau khi ITestLifeCycleReceiver.testEnded(com.android.tradefed.result.TestDescription, long, HashMap) xảy ra.

void processTestCaseStarted(TestRecordProto.TestRecord testCaseStartedRecord)

Xử lý proto bản ghi trường hợp kiểm thử một phần sau khi testStarted(com.android.tradefed.result.TestDescription, long) xảy ra.

void processTestModuleEnd(TestRecordProto.TestRecord moduleRecord)

Xử lý proto bản ghi mô-đun đã hoàn tất sau khi testModuleEnded() xảy ra.

void processTestModuleStarted(TestRecordProto.TestRecord moduleStartRecord)

Xử lý proto bản ghi mô-đun một phần sau khi testModuleStarted(com.android.tradefed.invoker.IInvocationContext) xảy ra.

void processTestRunEnded(TestRecordProto.TestRecord runRecord, boolean moduleInProgress)

Xử lý proto bản ghi chạy đã hoàn tất sau khi ITestLifeCycleReceiver.testRunEnded(long, HashMap) xảy ra.

void processTestRunStarted(TestRecordProto.TestRecord runStartedRecord)

Xử lý proto bản ghi chạy kiểm thử một phần sau khi testRunStarted(String, int) xảy ra.

boolean supportGranularResults()
final void testAssumptionFailure(TestDescription test, String trace)
final void testAssumptionFailure(TestDescription test, FailureDescription failure)
final void testEnded(TestDescription test, long endTime, testMetrics)
void testEnded(TestDescription test, testMetrics)
final void testFailed(TestDescription test, FailureDescription failure)
final void testFailed(TestDescription test, String trace)
final void testIgnored(TestDescription test)
final void testModuleEnded()
final void testModuleStarted(IInvocationContext moduleContext)
final void testRunEnded(long elapsedTimeMillis, runMetrics)
final void testRunFailed(FailureDescription failure)
final void testRunFailed(String errorMessage)
void testRunStarted(String runName, int testCount, int attemptNumber)
final void testRunStarted(String runName, int testCount)
void testRunStarted(String runName, int testCount, int attemptNumber, long startTime)
final void testStarted(TestDescription test, long startTime)
final void testStarted(TestDescription test)

Phương thức được bảo vệ

TestRecordProto.ChildReference createModuleChildReference(TestRecordProto.TestRecord record)

Tạo tệp đối chiếu con cho một mô-đun.

Hàm khởi tạo công khai

ProtoResultReporter

public ProtoResultReporter ()

Phương thức công khai

invocationEnded

public final void invocationEnded (long elapsedTime)

Tham số
elapsedTime long

invocationFailed

public void invocationFailed (FailureDescription failure)

Tham số
failure FailureDescription

invocationFailed

public void invocationFailed (Throwable cause)

Tham số
cause Throwable

invocationStarted

public final void invocationStarted (IInvocationContext context)

Tham số
context IInvocationContext

logAssociation

public final void logAssociation (String dataName, 
                LogFile logFile)

Tham số
dataName String

logFile LogFile

processFinalProto

public void processFinalProto (TestRecordProto.TestRecord finalRecord)

Xử lý proto cuối cùng với tất cả kết quả.

Tham số
finalRecord TestRecordProto.TestRecord: Tệp proto đã hoàn tất với tất cả kết quả gọi.

processStartInvocation

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

Xử lý proto bản ghi kiểm thử lệnh gọi một phần sau khi invocationStarted(com.android.tradefed.invoker.IInvocationContext) xảy ra.

Tham số
invocationStartRecord TestRecordProto.TestRecord: Một phần proto được điền sau khi invocationStart.

invocationContext IInvocationContext: Lệnh gọi IInvocationContext.

processTestCaseEnded

public void processTestCaseEnded (TestRecordProto.TestRecord testCaseRecord)

Xử lý proto bản ghi trường hợp kiểm thử đã hoàn tất sau khi ITestLifeCycleReceiver.testEnded(com.android.tradefed.result.TestDescription, long, HashMap) xảy ra.

Tham số
testCaseRecord TestRecordProto.TestRecord: Tệp proto đã hoàn tất đại diện cho một trường hợp kiểm thử.

processTestCaseStarted

public void processTestCaseStarted (TestRecordProto.TestRecord testCaseStartedRecord)

Xử lý proto bản ghi trường hợp kiểm thử một phần sau khi testStarted(com.android.tradefed.result.TestDescription, long) xảy ra.

Tham số
testCaseStartedRecord TestRecordProto.TestRecord: Một phần proto đại diện cho trường hợp kiểm thử.

processTestModuleEnd

public void processTestModuleEnd (TestRecordProto.TestRecord moduleRecord)

Xử lý proto bản ghi mô-đun đã hoàn tất sau khi testModuleEnded() xảy ra.

Tham số
moduleRecord TestRecordProto.TestRecord: Tệp proto đã hoàn thiện đại diện cho mô-đun.

processTestModuleStarted

public void processTestModuleStarted (TestRecordProto.TestRecord moduleStartRecord)

Xử lý proto bản ghi mô-đun một phần sau khi testModuleStarted(com.android.tradefed.invoker.IInvocationContext) xảy ra.

Tham số
moduleStartRecord TestRecordProto.TestRecord: Một phần proto đại diện cho mô-đun.

processTestRunEnded

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

Xử lý proto bản ghi chạy đã hoàn tất sau khi ITestLifeCycleReceiver.testRunEnded(long, HashMap) xảy ra.

Tham số
runRecord TestRecordProto.TestRecord: Tệp proto đã hoàn tất đại diện cho lần chạy.

moduleInProgress boolean: liệu một mô-đun có đang hoạt động hay không.

processTestRunStarted

public void processTestRunStarted (TestRecordProto.TestRecord runStartedRecord)

Xử lý proto bản ghi chạy kiểm thử một phần sau khi testRunStarted(String, int) xảy ra.

Tham số
runStartedRecord TestRecordProto.TestRecord: Một phần proto đại diện cho lần chạy.

supportGranularResults

public boolean supportGranularResults ()

Giá trị trả về
boolean

testAssumptionFailure

public final void testAssumptionFailure (TestDescription test, 
                String trace)

Tham số
test TestDescription

trace String

testAssumptionFailure

public final void testAssumptionFailure (TestDescription test, 
                FailureDescription failure)

Tham số
test TestDescription

failure FailureDescription

testEnded

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

Tham số
test TestDescription

endTime long

testMetrics

testEnded

public void testEnded (TestDescription test, 
                 testMetrics)

Tham số
test TestDescription

testMetrics

testFailed

public final void testFailed (TestDescription test, 
                FailureDescription failure)

Tham số
test TestDescription

failure FailureDescription

testFailed

public final void testFailed (TestDescription test, 
                String trace)

Tham số
test TestDescription

trace String

testIgnored

public final void testIgnored (TestDescription test)

Tham số
test TestDescription

testModuleEnded

public final void testModuleEnded ()

testModuleStarted

public final void testModuleStarted (IInvocationContext moduleContext)

Tham số
moduleContext IInvocationContext

testRunEnded

public final void testRunEnded (long elapsedTimeMillis, 
                 runMetrics)

Tham số
elapsedTimeMillis long

runMetrics

testRunFailed

public final void testRunFailed (FailureDescription failure)

Tham số
failure FailureDescription

testRunFailed

public final void testRunFailed (String errorMessage)

Tham số
errorMessage String

testRunStarted

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

Tham số
runName String

testCount int

attemptNumber int

testRunStarted

public final void testRunStarted (String runName, 
                int testCount)

Tham số
runName String

testCount int

testRunStarted

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

Tham số
runName String

testCount int

attemptNumber int

startTime long

testStarted

public final void testStarted (TestDescription test, 
                long startTime)

Tham số
test TestDescription

startTime long

testStarted

public final void testStarted (TestDescription test)

Tham số
test TestDescription

Phương thức được bảo vệ

createModuleChildReference

protected TestRecordProto.ChildReference createModuleChildReference (TestRecordProto.TestRecord record)

Tạo tệp đối chiếu con cho một mô-đun.

Tham số
record TestRecordProto.TestRecord

Trả về
TestRecordProto.ChildReference