ResultForwarder

public class ResultForwarder
extends Object implements ITestInvocationListener

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


用于将调用结果转发给其他监听器列表的 ITestInvocationListener

摘要

公共构造函数

ResultForwarder( listeners)

创建 ResultForwarder

ResultForwarder(ITestInvocationListener... listeners)

ResultForwarder 的备用变量实参构造函数。

受保护的构造函数

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)

void 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)

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)

在构建后设置监听器。

void setListeners(ITestInvocationListener... listeners)

在构建后设置监听器。

公共构造函数

ResultForwarder

public ResultForwarder ( listeners)

创建 ResultForwarder

参数
listeners :要将结果转发到的实际 ITestInvocationListener

ResultForwarder

public ResultForwarder (ITestInvocationListener... listeners)

ResultForwarder 的备用变量实参构造函数。

参数
listeners ITestInvocationListener:要将结果转发到的实际 ITestInvocationListener

受保护的构造函数

ResultForwarder

protected ResultForwarder ()

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

公共方法

getSummary

public TestSummary getSummary ()

返回
TestSummary

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

testAssumptionFailure

public void testAssumptionFailure (TestDescription test, 
                String trace)

参数
test TestDescription

trace String

testAssumptionFailure

public void testAssumptionFailure (TestDescription test, 
                FailureDescription failure)

参数
test TestDescription

failure FailureDescription

testEnded

public void testEnded (TestDescription test, 
                long endTime, 
                 testMetrics)

参数
test TestDescription

endTime long

testMetrics

testEnded

public void testEnded (TestDescription test, 
                 testMetrics)

参数
test TestDescription

testMetrics

testFailed

public void testFailed (TestDescription test, 
                FailureDescription failure)

参数
test TestDescription

failure FailureDescription

testFailed

public void testFailed (TestDescription test, 
                String trace)

参数
test TestDescription

trace String

testIgnored

public void testIgnored (TestDescription test)

参数
test TestDescription

testLog

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

参数
dataName String

dataType LogDataType

dataStream InputStreamSource

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 errorMessage)

参数
errorMessage String

testRunStarted

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

参数
runName String

testCount int

attemptNumber int

testRunStarted

public void testRunStarted (String runName, 
                int testCount)

参数
runName String

testCount int

testRunStarted

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

参数
runName String

testCount int

attemptNumber int

startTime long

testRunStopped

public void testRunStopped (long elapsedTime)

参数
elapsedTime long

testStarted

public void testStarted (TestDescription test, 
                long startTime)

参数
test TestDescription

startTime long

testStarted

public void testStarted (TestDescription test)

参数
test TestDescription

受保护的方法

getListeners

protected  getListeners ()

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

返回
ITestInvocationListener 的列表。

setListeners

protected void setListeners ( listeners)

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

参数
listeners :要将结果转发到的实际 ITestInvocationListener

setListeners

protected void setListeners (ITestInvocationListener... listeners)

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

参数
listeners ITestInvocationListener:要将结果转发到的实际 ITestInvocationListener