ProtoResultReporter

public abstract class ProtoResultReporter
extends Object implements ITestInvocationListener, ILogSaverListener, ISupportGranularResults

java.lang.Object
   ↳ com.android.tradefed.result.proto.ProtoResultReporter


Le rapporteur de résultats crée un protobuf TestRecord contenant tous les résultats. Doit être étendu pour gérer ce qu'il faut faire avec le proto final dans processFinalProto(com.android.tradefed.result.proto.TestRecordProto.TestRecord).

Résumé

Constructeurs publics

ProtoResultReporter()

Méthodes publiques

final void invocationEnded(long elapsedTime)
void invocationFailed(FailureDescription failure)
void invocationFailed(Throwable cause)
final void invocationStarted(IInvocationContext context)
final void logAssociation(String dataName, LogFile logFile)
void processFinalProto(TestRecordProto.TestRecord finalRecord)

Gestion du prototype final avec tous les résultats.

void processStartInvocation(TestRecordProto.TestRecord invocationStartRecord, IInvocationContext invocationContext)

Gestion du proto d'enregistrement de test d'appel partiel après l'événement invocationStarted(com.android.tradefed.invoker.IInvocationContext).

void processTestCaseEnded(TestRecordProto.TestRecord testCaseRecord)

Gestion du proto d'enregistrement du cas de test finalisé après l'événement ITestLifeCycleReceiver.testEnded(com.android.tradefed.result.TestDescription, long, HashMap).

void processTestCaseStarted(TestRecordProto.TestRecord testCaseStartedRecord)

Gestion du proto d'enregistrement du scénario de test partiel après l'événement testStarted(com.android.tradefed.result.TestDescription, long).

void processTestModuleEnd(TestRecordProto.TestRecord moduleRecord)

Gestion du proto d'enregistrement de module finalisé après l'événement testModuleEnded().

void processTestModuleStarted(TestRecordProto.TestRecord moduleStartRecord)

Gestion du proto d'enregistrement de module partiel après l'événement testModuleStarted(com.android.tradefed.invoker.IInvocationContext).

void processTestRunEnded(TestRecordProto.TestRecord runRecord, boolean moduleInProgress)

Gestion du proto d'enregistrement d'exécution finalisé après l'événement ITestLifeCycleReceiver.testRunEnded(long, HashMap).

void processTestRunStarted(TestRecordProto.TestRecord runStartedRecord)

Gestion du proto d'enregistrement d'exécution de test partiel après l'événement testRunStarted(String, int).

boolean supportGranularResults()
final void testAssumptionFailure(TestDescription test, String trace)
final void testAssumptionFailure(TestDescription test, FailureDescription failure)
final void testEnded(TestDescription test, long endTime, testMetrics)
void testEnded(TestDescription test, testMetrics)
final void testFailed(TestDescription test, FailureDescription failure)
final void testFailed(TestDescription test, String trace)
final void testIgnored(TestDescription test)
final void testModuleEnded()
final void testModuleStarted(IInvocationContext moduleContext)
final void testRunEnded(long elapsedTimeMillis, runMetrics)
final void testRunFailed(FailureDescription failure)
final void testRunFailed(String errorMessage)
void testRunStarted(String runName, int testCount, int attemptNumber)
final void testRunStarted(String runName, int testCount)
void testRunStarted(String runName, int testCount, int attemptNumber, long startTime)
final void testStarted(TestDescription test, long startTime)
final void testStarted(TestDescription test)

Méthodes protégées

TestRecordProto.ChildReference createModuleChildReference(TestRecordProto.TestRecord record)

Crée une référence enfant pour un module.

Constructeurs publics

ProtoResultReporter

public ProtoResultReporter ()

Méthodes publiques

invocationEnded

public final void invocationEnded (long elapsedTime)

Paramètres
elapsedTime long

invocationFailed

public void invocationFailed (FailureDescription failure)

Paramètres
failure FailureDescription

invocationFailed

public void invocationFailed (Throwable cause)

Paramètres
cause Throwable

invocationStarted

public final void invocationStarted (IInvocationContext context)

Paramètres
context IInvocationContext

logAssociation

public final void logAssociation (String dataName, 
                LogFile logFile)

Paramètres
dataName String

logFile LogFile

processFinalProto

public void processFinalProto (TestRecordProto.TestRecord finalRecord)

Gestion du prototype final avec tous les résultats.

Paramètres
finalRecord TestRecordProto.TestRecord: le proto finalisé avec tous les résultats d'appel.

processStartInvocation

public void processStartInvocation (TestRecordProto.TestRecord invocationStartRecord, 
                IInvocationContext invocationContext)

Gestion du proto d'enregistrement de test d'appel partiel après l'événement invocationStarted(com.android.tradefed.invoker.IInvocationContext).

Paramètres
invocationStartRecord TestRecordProto.TestRecord: proto partiel renseigné après l'invocationStart.

invocationContext IInvocationContext: l'appel IInvocationContext.

processTestCaseEnded

public void processTestCaseEnded (TestRecordProto.TestRecord testCaseRecord)

Gestion du proto d'enregistrement du cas de test finalisé après l'événement ITestLifeCycleReceiver.testEnded(com.android.tradefed.result.TestDescription, long, HashMap).

Paramètres
testCaseRecord TestRecordProto.TestRecord: proto finalisé représentant un cas de test.

processTestCaseStarted

public void processTestCaseStarted (TestRecordProto.TestRecord testCaseStartedRecord)

Gestion du proto d'enregistrement du scénario de test partiel après l'événement testStarted(com.android.tradefed.result.TestDescription, long).

Paramètres
testCaseStartedRecord TestRecordProto.TestRecord: proto partiel représentant le scénario de test.

processTestModuleEnd

public void processTestModuleEnd (TestRecordProto.TestRecord moduleRecord)

Gestion du proto d'enregistrement de module finalisé après l'événement testModuleEnded().

Paramètres
moduleRecord TestRecordProto.TestRecord: proto finalisé représentant le module.

processTestModuleStarted

public void processTestModuleStarted (TestRecordProto.TestRecord moduleStartRecord)

Gestion du proto d'enregistrement de module partiel après l'événement testModuleStarted(com.android.tradefed.invoker.IInvocationContext).

Paramètres
moduleStartRecord TestRecordProto.TestRecord: proto partiel représentant le module.

processTestRunEnded

public void processTestRunEnded (TestRecordProto.TestRecord runRecord, 
                boolean moduleInProgress)

Gestion du proto d'enregistrement d'exécution finalisé après l'événement ITestLifeCycleReceiver.testRunEnded(long, HashMap).

Paramètres
runRecord TestRecordProto.TestRecord: le proto finalisé représentant l'exécution.

moduleInProgress boolean: indique si un module est en cours d'exécution.

processTestRunStarted

public void processTestRunStarted (TestRecordProto.TestRecord runStartedRecord)

Gestion du proto d'enregistrement d'exécution de test partiel après l'événement testRunStarted(String, int).

Paramètres
runStartedRecord TestRecordProto.TestRecord: proto partiel représentant l'exécution.

supportGranularResults

public boolean supportGranularResults ()

Renvoie
boolean

testAssumptionFailure

public final void testAssumptionFailure (TestDescription test, 
                String trace)

Paramètres
test TestDescription

trace String

testAssumptionFailure

public final void testAssumptionFailure (TestDescription test, 
                FailureDescription failure)

Paramètres
test TestDescription

failure FailureDescription

testEnded

public final void testEnded (TestDescription test, 
                long endTime, 
                 testMetrics)

Paramètres
test TestDescription

endTime long

testMetrics

testEnded

public void testEnded (TestDescription test, 
                 testMetrics)

Paramètres
test TestDescription

testMetrics

testFailed

public final void testFailed (TestDescription test, 
                FailureDescription failure)

Paramètres
test TestDescription

failure FailureDescription

testFailed

public final void testFailed (TestDescription test, 
                String trace)

Paramètres
test TestDescription

trace String

testIgnored

public final void testIgnored (TestDescription test)

Paramètres
test TestDescription

testModuleEnded

public final void testModuleEnded ()

testModuleStarted

public final void testModuleStarted (IInvocationContext moduleContext)

Paramètres
moduleContext IInvocationContext

testRunEnded

public final void testRunEnded (long elapsedTimeMillis, 
                 runMetrics)

Paramètres
elapsedTimeMillis long

runMetrics

testRunFailed

public final void testRunFailed (FailureDescription failure)

Paramètres
failure FailureDescription

testRunFailed

public final void testRunFailed (String errorMessage)

Paramètres
errorMessage String

testRunStarted

public void testRunStarted (String runName, 
                int testCount, 
                int attemptNumber)

Paramètres
runName String

testCount int

attemptNumber int

testRunStarted

public final void testRunStarted (String runName, 
                int testCount)

Paramètres
runName String

testCount int

testRunStarted

public void testRunStarted (String runName, 
                int testCount, 
                int attemptNumber, 
                long startTime)

Paramètres
runName String

testCount int

attemptNumber int

startTime long

testStarted

public final void testStarted (TestDescription test, 
                long startTime)

Paramètres
test TestDescription

startTime long

testStarted

public final void testStarted (TestDescription test)

Paramètres
test TestDescription

Méthodes protégées

createModuleChildReference

protected TestRecordProto.ChildReference createModuleChildReference (TestRecordProto.TestRecord record)

Crée une référence enfant pour un module.

Paramètres
record TestRecordProto.TestRecord

Renvoie
TestRecordProto.ChildReference