分片监听器
public class ShardListener
extends CollectingTestListener
implements ISupportGranularResults
一个ITestInvocationListener
,用于从调用分片(也称为在多个资源上并行运行的调用拆分)收集结果,并将它们转发到另一个侦听器。
概括
公共方法 |
---|
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
。
公共方法
调用结束
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 setSupportGranularResults (boolean enableGranularResults)
参数 |
---|
enableGranularResults | boolean |
支持粒度结果
public boolean supportGranularResults ()
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 failureMessage)
测试运行开始
public void testRunStarted (String name,
int numTests,
int attemptNumber,
long startTime)
参数 |
---|
name | String |
numTests | int |
attemptNumber | int |
startTime | long |