ShardListener

public class ShardListener
extends CollectingTestListener implements ISupportGranularResults

java.lang.Object
   ↳ com.android.tradefed.result.CollectingTestListener
     ↳ com.android.tradefed.invoker.ShardListener


ITestInvocationListener 會收集呼叫分割作業 (也就是在多個資源上並行執行的呼叫分割作業) 的結果,並將結果轉送至其他事件監聽器。

摘要

公用建構函式

ShardListener(ITestInvocationListener main)

建立 ShardListener

公用方法

void invocationEnded(long elapsedTime)

void invocationFailed(FailureDescription failure)

void invocationFailed(Throwable cause)

void invocationStarted(IInvocationContext context)

void setSupportGranularResults(boolean enableGranularResults)
boolean supportGranularResults()

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)

void testRunFailed(FailureDescription failure)

void testRunFailed(String failureMessage)

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

公用建構函式

ShardListener

public ShardListener (ITestInvocationListener main)

建立 ShardListener

參數
main ITestInvocationListener:應轉送結果的 ITestInvocationListener。為避免與其他 ShardListener 發生衝突,此物件會在轉寄結果時在 main 上同步處理。只有在叫用區塊完成後,系統才會傳送結果。

公用方法

invocationEnded

public void invocationEnded (long elapsedTime)

參數
elapsedTime long

invocationFailed

public void invocationFailed (FailureDescription failure)

參數
failure FailureDescription

invocationFailed

public void invocationFailed (Throwable cause)

參數
cause Throwable

invocationStarted

public void invocationStarted (IInvocationContext context)

參數
context IInvocationContext

setSupportGranularResults

public void setSupportGranularResults (boolean enableGranularResults)

參數
enableGranularResults boolean

supportGranularResults

public boolean supportGranularResults ()

傳回
boolean

testLog

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

參數
dataName String

dataType LogDataType

dataStream InputStreamSource

testLogSaved

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

參數
dataName String

dataType LogDataType

dataStream InputStreamSource

logFile LogFile

testModuleEnded

public void testModuleEnded ()

testModuleStarted

public void testModuleStarted (IInvocationContext moduleContext)

參數
moduleContext IInvocationContext

testRunEnded

public void testRunEnded (long elapsedTime, 
                 runMetrics)

參數
elapsedTime long

runMetrics

testRunFailed

public void testRunFailed (FailureDescription failure)

參數
failure FailureDescription

testRunFailed

public void testRunFailed (String failureMessage)

參數
failureMessage String

testRunStarted

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

參數
name String

numTests int

attemptNumber int

startTime long