结果聚合器
public class ResultAggregator
extends CollectingTestListener
根据采取的重试策略,在需要时聚合结果的特殊转发器。
概括
公共方法 |
---|
void | cleanEventsFiles () |
final void | forwardAggregatedInvocationLogs () 将所有调用级别日志转发给不支持粒度结果的结果报告器。 |
void | invocationEnded (long elapsedTime) |
void | invocationFailed (FailureDescription failure) |
void | invocationFailed (Throwable cause) |
void | invocationStarted (IInvocationContext context) |
void | logAssociation (String dataName, LogFile logFile) |
void | setLogSaver (ILogSaver logSaver) |
void | setUpdatedReporting (boolean updatedReporting) 设置新报告。 |
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 | testFailed (TestDescription test, FailureDescription failure) |
void | testFailed (TestDescription test, String trace) |
void | testIgnored (TestDescription test) |
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 errorMessage) |
void | testRunStarted (String name, int testCount, int attemptNumber, long startTime) |
void | testStarted (TestDescription test, long startTime) |
公共构造函数
结果聚合器
public ResultAggregator ( listeners,
RetryStrategy strategy)
参数 |
---|
listeners | |
strategy | RetryStrategy |
公共方法
清理事件文件
public void cleanEventsFiles ()
forwardAggregatedInvocationLogs
public final void forwardAggregatedInvocationLogs ()
将所有调用级别日志转发给不支持粒度结果的结果报告器。
调用结束
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 logAssociation (String dataName,
LogFile logFile)
参数 |
---|
dataName | String |
logFile | LogFile |
设置日志保护程序
public void setLogSaver (ILogSaver logSaver)
设置更新报告
public void setUpdatedReporting (boolean updatedReporting)
设置新报告。
参数 |
---|
updatedReporting | boolean |
测试假设失败
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 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 testLogSaved (String dataName,
LogDataType dataType,
InputStreamSource dataStream,
LogFile logFile)
参数 |
---|
dataName | String |
dataType | LogDataType |
dataStream | InputStreamSource |
logFile | LogFile |
测试模块结束
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 name,
int testCount,
int attemptNumber,
long startTime)
参数 |
---|
name | String |
testCount | int |
attemptNumber | int |
startTime | long |
测试开始
public void testStarted (TestDescription test,
long startTime)
参数 |
---|
test | TestDescription |
startTime | long |
受保护的方法
获取事件日志
protected File[] getEventsLogs ()