结果转发器
public class ResultForwarder
extends Object
implements ITestInvocationListener
java.lang.Object |
↳ | com.android.tradefed.result.ResultForwarder |
将调用结果转发到其他侦听器列表的ITestInvocationListener
。
概括
公共方法 |
---|
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) |
公共构造函数
结果转发器
public ResultForwarder (ITestInvocationListener... listeners)
ResultForwarder
的备用变量 arg 构造函数。
受保护的构造函数
公共方法
获取摘要
public TestSummary getSummary ()
调用结束
public void invocationEnded (long elapsedTime)
调用失败
public void invocationFailed (FailureDescription failure)
参数 |
---|
failure | FailureDescription |
调用失败
public void invocationFailed (Throwable cause)
调用开始
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)
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)
测试运行开始
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)
测试开始
public void testStarted (TestDescription test,
long startTime)
参数 |
---|
test | TestDescription |
startTime | long |
测试开始
public void testStarted (TestDescription test)
受保护的方法
获取监听器
protected getListeners ()
获取听众列表。仅供子类使用。
设置监听器
protected void setListeners ( listeners)
构建后设置监听器。仅供子类使用。
设置监听器
protected void setListeners (ITestInvocationListener... listeners)
构建后设置监听器。仅供子类使用。