结果聚合器

public class ResultAggregator
extends CollectingTestListener

java.lang.Object
com.android.tradefed.result.CollectingTestListener
com.android.tradefed.retry.ResultAggregator


特殊转发器,根据所采取的重试策略,在需要时聚合结果。

概括

公共构造函数

ResultAggregator ( listeners, RetryStrategy strategy) ResultAggregator ( listeners, RetryStrategy strategy)

公共方法

void cleanEventsFiles ()
final void forwardAggregatedInvocationLogs ()

将所有调用级别日志转发到不支持粒度结果的结果报告器。

void invocationEnded (long elapsedTime)

void invocationFailed (FailureDescription failure)

void invocationFailed (Throwable cause)

void invocationStarted (IInvocationContext context)

void logAssociation (String dataName, LogFile logFile)

void setLogSaver (ILogSaver logSaver)

void setUpdatedReporting (boolean updatedReporting)

设置新的报告。

void testAssumptionFailure (TestDescription test, String trace)
void testAssumptionFailure (TestDescription test, FailureDescription failure)
void testEnded (TestDescription test, long endTime, testMetrics) testEnded (TestDescription test, long endTime, testMetrics)

void testFailed (TestDescription test, FailureDescription failure)
void testFailed (TestDescription test, String trace)

void testIgnored (TestDescription test)
void testLog (String dataName, LogDataType dataType, InputStreamSource dataStream)

void testLogSaved (String dataName, LogDataType dataType, InputStreamSource dataStream, LogFile logFile)
void testModuleEnded ()
void testModuleStarted (IInvocationContext moduleContext)

void testRunEnded (long elapsedTime, runMetrics) testRunEnded (long elapsedTime, runMetrics)

void testRunFailed (FailureDescription failure)

void testRunFailed (String errorMessage)

void testRunStarted (String name, int testCount, int attemptNumber, long startTime)

void testStarted (TestDescription test, long startTime)

受保护的方法

File[] getEventsLogs ()

公共构造函数

结果聚合器

public ResultAggregator ( listeners, 
                RetryStrategy strategy)

参数
listeners

strategy RetryStrategy

公共方法

清理事件文件

public void cleanEventsFiles ()

转发聚合调用日志

public final void forwardAggregatedInvocationLogs ()

将所有调用级别日志转发到不支持粒度结果的结果报告器。

调用结束

public void invocationEnded (long elapsedTime)

参数
elapsedTime long

调用失败

public void invocationFailed (FailureDescription failure)

参数
failure FailureDescription

调用失败

public void invocationFailed (Throwable cause)

参数
cause Throwable

调用开始

public void invocationStarted (IInvocationContext context)

参数
context IInvocationContext

日志关联

public void logAssociation (String dataName, 
                LogFile logFile)

参数
dataName String

logFile LogFile

设置日志保存程序

public void setLogSaver (ILogSaver logSaver)

参数
logSaver ILogSaver

设置更新报告

public void setUpdatedReporting (boolean updatedReporting)

设置新的报告。

参数
updatedReporting boolean

测试假设失败

public void testAssumptionFailure (TestDescription test, 
                String trace)

参数
test TestDescription

trace String

测试假设失败

public void testAssumptionFailure (TestDescription test, 
                FailureDescription failure)

参数
test TestDescription

failure FailureDescription

测试结束

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

参数
test TestDescription

endTime long

testMetrics

测试失败

public void testFailed (TestDescription test, 
                FailureDescription failure)

参数
test TestDescription

failure FailureDescription

测试失败

public void testFailed (TestDescription test, 
                String trace)

参数
test TestDescription

trace String

测试被忽略

public void testIgnored (TestDescription test)

参数
test TestDescription

测试日志

public void testLog (String dataName, 
                LogDataType dataType, 
                InputStreamSource dataStream)

参数
dataName String

dataType LogDataType

dataStream InputStreamSource

测试日志已保存

public void testLogSaved (String dataName, 
                LogDataType dataType, 
                InputStreamSource dataStream, 
                LogFile logFile)

参数
dataName String

dataType LogDataType

dataStream InputStreamSource

logFile LogFile

测试模块结束

public void testModuleEnded ()

测试模块启动

public void testModuleStarted (IInvocationContext moduleContext)

参数
moduleContext IInvocationContext

测试运行结束

public void testRunEnded (long elapsedTime, 
                 runMetrics)

参数
elapsedTime long

runMetrics

测试运行失败

public void testRunFailed (FailureDescription failure)

参数
failure FailureDescription

测试运行失败

public void testRunFailed (String errorMessage)

参数
errorMessage String

测试运行开始

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

参数
name String

testCount int

attemptNumber int

startTime long

测试开始

public void testStarted (TestDescription test, 
                long startTime)

参数
test TestDescription

startTime long

受保护的方法

获取事件日志

protected File[] getEventsLogs ()

退货
File[]