結果聚合器

public class ResultAggregator
extends CollectingTestListener

對象
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 ()

forwardAggregatedInvocationLogs

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[]