分片監聽器
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 |