Pendengar Shard
public class ShardListener
extends CollectingTestListener
implements ISupportGranularResults
ITestInvocationListener
yang mengumpulkan hasil dari pecahan doa (alias pemisahan doa untuk dijalankan pada beberapa sumber daya secara paralel), dan meneruskannya ke pendengar lain.
Ringkasan
Metode publik |
---|
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) |
Konstruktor publik
Pendengar Shard
public ShardListener (ITestInvocationListener main)
Buat ShardListener
.
Parameter |
---|
main | ITestInvocationListener : ITestInvocationListener hasilnya harus diteruskan. Untuk mencegah tabrakan dengan ShardListener lainnya, objek ini akan disinkronkan di main saat meneruskan hasil. Dan hasilnya hanya akan dikirim setelah pecahan pemanggilan selesai. |
Metode publik
doaBerakhir
public void invocationEnded (long elapsedTime)
Parameter |
---|
elapsedTime | long |
doaGagal
public void invocationFailed (FailureDescription failure)
Parameter |
---|
failure | FailureDescription |
doaGagal
public void invocationFailed (Throwable cause)
Parameter |
---|
cause | Throwable |
doaDimulai
public void invocationStarted (IInvocationContext context)
Parameter |
---|
context | IInvocationContext |
setSupportGranularResults
public void setSupportGranularResults (boolean enableGranularResults)
Parameter |
---|
enableGranularResults | boolean |
dukunganGranularResults
public boolean supportGranularResults ()
public void testLog (String dataName,
LogDataType dataType,
InputStreamSource dataStream)
Parameter |
---|
dataName | String |
dataType | LogDataType |
dataStream | InputStreamSource |
public void testLogSaved (String dataName,
LogDataType dataType,
InputStreamSource dataStream,
LogFile logFile)
Parameter |
---|
dataName | String |
dataType | LogDataType |
dataStream | InputStreamSource |
logFile | LogFile |
testModuleBerakhir
public void testModuleEnded ()
testModuleStarted
public void testModuleStarted (IInvocationContext moduleContext)
Parameter |
---|
moduleContext | IInvocationContext |
testRunEnded
public void testRunEnded (long elapsedTime,
runMetrics)
Parameter |
---|
elapsedTime | long |
runMetrics | |
testRunFailed
public void testRunFailed (FailureDescription failure)
Parameter |
---|
failure | FailureDescription |
testRunFailed
public void testRunFailed (String failureMessage)
Parameter |
---|
failureMessage | String |
tesRunStarted
public void testRunStarted (String name,
int numTests,
int attemptNumber,
long startTime)
Parameter |
---|
name | String |
numTests | int |
attemptNumber | int |
startTime | long |