碎片监听器
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 |
setSupportGranularResults
public void setSupportGranularResults (boolean enableGranularResults)
参量 |
---|
enableGranularResults | boolean |
supportGranularResults
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 |
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 failureMessage)
testRunStarted
public void testRunStarted (String name,
int numTests,
int attemptNumber,
long startTime)
参量 |
---|
name | String |
numTests | int |
attemptNumber | int |
startTime | long |