结果转发器

public class ResultForwarder
extends Object implements ITestInvocationListener

java.lang.Object
com.android.tradefed.result.ResultForwarder


将调用结果转发到其他侦听器列表的ITestInvocationListener

概括

公共构造函数

ResultForwarder ( listeners) ResultForwarder ( listeners)

创建一个ResultForwarder

ResultForwarder (ITestInvocationListener... listeners)

ResultForwarder的备用变量 arg 构造函数。

受保护的构造函数

ResultForwarder ()

创建具有延迟侦听器设置的ResultForwarder

公共方法

TestSummary getSummary ()

void invocationEnded (long elapsedTime)

void invocationFailed (FailureDescription failure)

void invocationFailed (Throwable cause)

void invocationStarted (IInvocationContext context)

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 testEnded (TestDescription test, testMetrics) testEnded (TestDescription test, 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 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 runName, int testCount, int attemptNumber)

void testRunStarted (String runName, int testCount)

void testRunStarted (String runName, int testCount, int attemptNumber, long startTime)

void testRunStopped (long elapsedTime)

void testStarted (TestDescription test, long startTime)

void testStarted (TestDescription test)

受保护的方法

getListeners ()

获取听众列表。

void setListeners ( listeners) setListeners ( listeners)

构建后设置监听器。

void setListeners (ITestInvocationListener... listeners)

构建后设置监听器。

公共构造函数

结果转发器

public ResultForwarder ( listeners)

创建一个ResultForwarder

参数
listeners :将结果转发到的真正的ITestInvocationListener

结果转发器

public ResultForwarder (ITestInvocationListener... listeners)

ResultForwarder的备用变量 arg 构造函数。

参数
listeners ITestInvocationListener :将结果转发到的真正的ITestInvocationListener

受保护的构造函数

结果转发器

protected ResultForwarder ()

创建具有延迟侦听器设置的ResultForwarder 。仅供子类使用。

公共方法

获取摘要

public TestSummary getSummary ()

退货
TestSummary

调用结束

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 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 testEnded (TestDescription test, 
                 testMetrics)

参数
test TestDescription

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 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 runName, 
                int testCount, 
                int attemptNumber)

参数
runName String

testCount int

attemptNumber int

测试运行开始

public void testRunStarted (String runName, 
                int testCount)

参数
runName String

testCount int

测试运行开始

public void testRunStarted (String runName, 
                int testCount, 
                int attemptNumber, 
                long startTime)

参数
runName String

testCount int

attemptNumber int

startTime long

测试运行停止

public void testRunStopped (long elapsedTime)

参数
elapsedTime long

测试开始

public void testStarted (TestDescription test, 
                long startTime)

参数
test TestDescription

startTime long

测试开始

public void testStarted (TestDescription test)

参数
test TestDescription

受保护的方法

获取监听器

protected  getListeners ()

获取听众列表。仅供子类使用。

退货
ITestInvocationListener的列表。

设置监听器

protected void setListeners ( listeners)

构建后设置监听器。仅供子类使用。

参数
listeners :将结果转发到的真正的ITestInvocationListener

设置监听器

protected void setListeners (ITestInvocationListener... listeners)

构建后设置监听器。仅供子类使用。

参数
listeners ITestInvocationListener :将结果转发到的真正的ITestInvocationListener