Google is committed to advancing racial equity for Black communities. See how.
本頁面由 Cloud Translation API 翻譯而成。
Switch to English

碎片監聽器

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) testRunEnded (long elapsedTime, runMetrics)

void testRunFailed (FailureDescription failure)

void testRunFailed (String failureMessage)

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

公共建設者

碎片監聽器

public ShardListener (ITestInvocationListener main)

創建一個ShardListener

參量
main ITestInvocationListenerITestInvocationListener結果應該轉發。為了防止與其他ShardListener發生衝突,轉發結果時,此對象將在main同步。並且結果僅在調用分片完成後才發送。

公開方法

調用結束

public void invocationEnded (long elapsedTime)

參量
elapsedTime long

調用失敗

public void invocationFailed (FailureDescription failure)

參量
failure FailureDescription

調用失敗

52161eaeb

參量
cause Throwable

調用開始

900

參量
context IInvocationContext

setSupportGranularResults

public void setSupportGranularResults (boolean enableGranularResults)

參量
enableGranularResults boolean

supportGranularResults

public boolean supportGranularResults ()

退貨
boolean

測試日誌

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