Google 致力于为黑人社区推动种族平等。查看具体举措
此页面由 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

调用失败

public void invocationFailed (Throwable cause)

参量
cause Throwable

调用开始

public void invocationStarted (IInvocationContext context)

参量
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