ShardListener
public class ShardListener
extends CollectingTestListener
implements ISupportGranularResults
Un ITestInvocationListener
qui collecte les résultats d'une partition d'appel (c'est-à-dire une division d'appel à exécuter sur plusieurs ressources en parallèle) et les transmet à un autre écouteur.
Résumé
Méthodes publiques |
---|
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) |
Constructeurs publics
ShardListener
public ShardListener (ITestInvocationListener main)
Créez un ShardListener
.
Paramètres |
---|
main | ITestInvocationListener : le ITestInvocationListener dont les résultats doivent être transmis. Pour éviter les collisions avec d'autres ShardListener , cet objet se synchronisera sur main lors du transfert des résultats. Et les résultats ne seront envoyés qu’une fois le fragment d’invocation terminé. |
Méthodes publiques
invocationFin
public void invocationEnded (long elapsedTime)
Paramètres |
---|
elapsedTime | long |
échec de l'appel
public void invocationFailed (FailureDescription failure)
Paramètres |
---|
failure | FailureDescription |
échec de l'appel
public void invocationFailed (Throwable cause)
Paramètres |
---|
cause | Throwable |
invocationDémarrée
public void invocationStarted (IInvocationContext context)
Paramètres |
---|
context | IInvocationContext |
setSupportGranularResults
public void setSupportGranularResults (boolean enableGranularResults)
Paramètres |
---|
enableGranularResults | boolean |
supportGranularResults
public boolean supportGranularResults ()
public void testLog (String dataName,
LogDataType dataType,
InputStreamSource dataStream)
Paramètres |
---|
dataName | String |
dataType | LogDataType |
dataStream | InputStreamSource |
public void testLogSaved (String dataName,
LogDataType dataType,
InputStreamSource dataStream,
LogFile logFile)
Paramètres |
---|
dataName | String |
dataType | LogDataType |
dataStream | InputStreamSource |
logFile | LogFile |
testModuleFin
public void testModuleEnded ()
testModuleDémarré
public void testModuleStarted (IInvocationContext moduleContext)
Paramètres |
---|
moduleContext | IInvocationContext |
testRunEnded
public void testRunEnded (long elapsedTime,
runMetrics)
Paramètres |
---|
elapsedTime | long |
runMetrics | |
testRunFailed
public void testRunFailed (FailureDescription failure)
Paramètres |
---|
failure | FailureDescription |
testRunFailed
public void testRunFailed (String failureMessage)
Paramètres |
---|
failureMessage | String |
testRunStarted
public void testRunStarted (String name,
int numTests,
int attemptNumber,
long startTime)
Paramètres |
---|
name | String |
numTests | int |
attemptNumber | int |
startTime | long |