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。而且只有在 讀取及寫入資料。

公用方法

已叫用

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

setSupportGranularResults

public void setSupportGranularResults (boolean enableGranularResults)

參數
enableGranularResults boolean

支援 GranularResults

public boolean supportGranularResults ()

傳回
boolean

測試記錄

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

參數
dataName String

dataType LogDataType

dataStream InputStreamSource

testLog 已儲存

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