Google 致力于为黑人社区推动种族平等。查看具体举措
此页面由 Cloud Translation API 翻译。
Switch to English

ProtoResultReporter

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

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


结果报告程序构建一个TestRecord protobuf,其中包含所有结果。应该扩展为处理processFinalProto(com.android.tradefed.result.proto.TestRecordProto.TestRecord)的最终原型。

摘要

公共建设者

ProtoResultReporter ()

公开方法

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)

处理所有结果的最终原型。

void processStartInvocation (TestRecordProto.TestRecord invocationStartRecord, IInvocationContext invocationContext)

发生invocationStarted(com.android.tradefed.invoker.IInvocationContext)之后处理部分调用测试记录原型。

void processTestCaseEnded (TestRecordProto.TestRecord testCaseRecord)

在发生ITestLifeCycleReceiver.testEnded(com.android.tradefed.result.TestDescription, long, HashMap)之后处理最终的测试用例记录原型。

void processTestCaseStarted (TestRecordProto.TestRecord testCaseStartedRecord)

testStarted(com.android.tradefed.result.TestDescription, long)发生后处理部分测试用例记录原型。

void processTestModuleEnd (TestRecordProto.TestRecord moduleRecord)

testModuleEnded()发生后处理最终的模块记录原型。

void processTestModuleStarted (TestRecordProto.TestRecord moduleStartRecord)

testModuleStarted(com.android.tradefed.invoker.IInvocationContext)发生后处理部分模块记录原型。

void processTestRunEnded (TestRecordProto.TestRecord runRecord, boolean moduleInProgress)

ITestLifeCycleReceiver.testRunEnded(long, HashMap)发生后处理最终的运行记录原型。

void processTestRunStarted (TestRecordProto.TestRecord runStartedRecord)

testRunStarted(String, int)发生后,处理部分测试运行记录原型。

boolean supportGranularResults ()
final void testAssumptionFailure (TestDescription test, String trace)
final void testAssumptionFailure (TestDescription test, FailureDescription failure)
final void testEnded (TestDescription test, long endTime, testMetrics) testEnded (TestDescription test, long endTime, testMetrics)
void testEnded (TestDescription test, testMetrics) 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) 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)

公共建设者

ProtoResultReporter

public ProtoResultReporter ()

公开方法

调用结束

public final void invocationEnded (long elapsedTime)

参量
elapsedTime long

调用失败

public void invocationFailed (FailureDescription failure)

参量
failure FailureDescription

调用失败

public void invocationFailed (Throwable cause)

参量
cause Throwable

调用开始

public final void invocationStarted (IInvocationContext context)

参量
context IInvocationContext

logAssociation

public final void logAssociation (String dataName, 
                LogFile logFile)

参量
dataName String

logFile LogFile

processFinalProto

public void processFinalProto (TestRecordProto.TestRecord finalRecord)

处理所有结果的最终原型。

参量
finalRecord TestRecordProto.TestRecord :带有所有调用结果的最终原型。

processStartInvocation

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

发生invocationStarted(com.android.tradefed.invoker.IInvocationContext)之后处理部分调用测试记录原型。

参量
invocationStartRecord TestRecordProto.TestRecord :在invocationStart之后填充的部分协议。

invocationContext IInvocationContext :调用IInvocationContext

processTestCaseEnded

public void processTestCaseEnded (TestRecordProto.TestRecord testCaseRecord)

在发生ITestLifeCycleReceiver.testEnded(com.android.tradefed.result.TestDescription, long, HashMap)之后,处理最终的测试用例记录原型。

参量
testCaseRecord TestRecordProto.TestRecord :表示测试案例的最终原型。

processTestCaseStarted

public void processTestCaseStarted (TestRecordProto.TestRecord testCaseStartedRecord)

testStarted(com.android.tradefed.result.TestDescription, long)发生后处理部分测试用例记录原型。

参量
testCaseStartedRecord TestRecordProto.TestRecord :表示测试用例的部分原型。

processTestModuleEnd

394

testModuleEnded()发生后处理最终的模块记录原型。

参量
moduleRecord TestRecordProto.TestRecord :表示模块的最终原型。

processTestModuleStarted

public void processTestModuleStarted (TestRecordProto.TestRecord moduleStartRecord)

testModuleStarted(com.android.tradefed.invoker.IInvocationContext)发生后处理部分模块记录原型。

参量
moduleStartRecord TestRecordProto.TestRecord :表示模块的部分原型。

processTestRunEnded

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

ITestLifeCycleReceiver.testRunEnded(long, HashMap)发生后处理最终的运行记录原型。

参量
runRecord TestRecordProto.TestRecord :表示运行的最终原型。

moduleInProgress boolean :模块是否在进行中。

processTestRunStarted

public void processTestRunStarted (TestRecordProto.TestRecord runStartedRecord)

testRunStarted(String, int)发生后,处理部分测试运行记录原型。

参量
runStartedRecord TestRecordProto.TestRecord :表示运行的部分原型。

supportGranularResults

public boolean supportGranularResults ()

退货
boolean

testAssumptionFailure

public final void testAssumptionFailure (TestDescription test, 
                String trace)

参量
test TestDescription

trace String

testAssumptionFailure

public final void testAssumptionFailure (TestDescription test, 
                FailureDescription failure)

参量
test TestDescription

failure FailureDescription

testEnded

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

参量
test TestDescription

endTime long

testMetrics

testEnded

public void testEnded (TestDescription test, 
                 testMetrics)

参量
test TestDescription

testMetrics

测试失败

public final void testFailed (TestDescription test, 
                FailureDescription failure)

参量
test TestDescription

failure FailureDescription

测试失败

public final void testFailed (TestDescription test, 
                String trace)

参量
test TestDescription

trace String

testIgnored

public final void testIgnored (TestDescription test)

参量
test TestDescription

testModuleEnded

public final void testModuleEnded ()

testModuleStarted

public final void testModuleStarted (IInvocationContext moduleContext)

参量
moduleContext IInvocationContext

testRunEnded

public final void testRunEnded (long elapsedTimeMillis, 
                 runMetrics)

参量
elapsedTimeMillis long

runMetrics

testRunFailed

public final void testRunFailed (FailureDescription failure)

参量
failure FailureDescription

testRunFailed

public final void testRunFailed (String errorMessage)

参量
errorMessage String

testRunStarted

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

参量
runName String

testCount int

attemptNumber int

testRunStarted

public final void testRunStarted (String runName, 
                int testCount)

参量
runName String

testCount int

testRunStarted

床6377509

参量
runName String

testCount int

attemptNumber int

startTime long

testStarted

public final void testStarted (TestDescription test, 
                long startTime)

参量
test TestDescription

startTime long

testStarted

public final void testStarted (TestDescription test)

参量
test TestDescription