LegacySubprocessResultsReporter

public final class LegacySubprocessResultsReporter
extends SubprocessResultsReporter

java.lang.Obiekt
com.android.tradefed.result.SubprocessResultsReporter
com.android.tradefed.result.LegacySubprocessResultsReporter


Zamrożona implementacja raportującego wyniki podprocesu, która powinna pozostać kompatybilna z wcześniejszymi wersjami TF/CTS (np. 8+), pomimo zmian w swojej nadklasie.

Ten reporter można dynamicznie wstrzykiwać, aby umożliwić raportowanie podprocesów w starych zestawach testów opartych na TF.

Streszczenie

Konstruktory publiczne

LegacySubprocessResultsReporter ()

Chronieni konstruktorzy

LegacySubprocessResultsReporter (boolean installHandler)

Metody publiczne

void invocationEnded (long elapsedTime)

Zgłasza, że ​​wywołanie zakończyło się pomyślnie lub z powodu błędu.

void invocationFailed (Throwable cause)

Zgłasza niekompletne wywołanie z powodu błędu.

void invocationStarted ( IBuildInfo buildInfo)
void logAssociation (String dataName, LogFile logFile)

W niektórych przypadkach log musi być silnie powiązany z przypadkami testowymi, ale możliwość zrobienia tego na bezpośrednim testLogSaved(String, com.android.tradefed.result.LogDataType, com.android.tradefed.result.InputStreamSource, com.android.tradefed.result.LogFile) nie jest możliwa.

void setLogSaver ( ILogSaver logSaver)
void testAssumptionFailure (TestIdentifier testId, String trace)
void testEnded (TestIdentifier testId, metrics) testEnded (TestIdentifier testId, metrics)
void testEnded (TestIdentifier testId, long endTime, metrics) testEnded (TestIdentifier testId, long endTime, metrics)
void testFailed (TestIdentifier testId, String reason)
void testIgnored (TestIdentifier testId)
void testLogSaved (String dataName, LogDataType dataType, InputStreamSource dataStream, LogFile logFile)
void testModuleEnded ()

Zgłasza koniec uruchomienia modułu.

void testModuleStarted ( IInvocationContext moduleContext)

Zgłasza początek uruchomionego modułu.

void testRunEnded (long time, runMetrics) testRunEnded (long time, runMetrics)

Zgłasza koniec przebiegu testowego.

void testRunFailed (String reason)

Testowanie raportów nie zostało ukończone z powodu błędu krytycznego.

void testRunStarted (String runName, int testCount)

Zgłasza początek przebiegu testowego.

void testStarted (TestIdentifier testId)
void testStarted (TestIdentifier testId, long startTime)

Konstruktory publiczne

LegacySubprocessResultsReporter

public LegacySubprocessResultsReporter ()

Chronieni konstruktorzy

LegacySubprocessResultsReporter

protected LegacySubprocessResultsReporter (boolean installHandler)

Parametry
installHandler boolean

Metody publiczne

wywołanie zakończone

public void invocationEnded (long elapsedTime)

Zgłasza, że ​​wywołanie zakończyło się pomyślnie lub z powodu błędu.

Zostanie automatycznie wywołany przez platformę TradeFederation.

Parametry
elapsedTime long : czas, który upłynął od wywołania w ms

wywołanie nie powiodło się

public void invocationFailed (Throwable cause)

Zgłasza niekompletne wywołanie z powodu błędu.

Zostanie automatycznie wywołany przez platformę TradeFederation.

Parametry
cause Throwable : przyczyna niepowodzenia Throwable

wywołanie rozpoczęte

public void invocationStarted (IBuildInfo buildInfo)

Parametry
buildInfo IBuildInfo

logAssociation

public void logAssociation (String dataName, 
                LogFile logFile)

W niektórych przypadkach log musi być silnie powiązany z przypadkami testowymi, ale możliwość zrobienia tego na bezpośrednim wywołaniu zwrotnym testLogSaved(String, com.android.tradefed.result.LogDataType, com.android.tradefed.result.InputStreamSource, com.android.tradefed.result.LogFile) nie jest możliwa. Zatem to wywołanie zwrotne pozwala jawnie zapewnić silne powiązanie.

Parametry
dataName String : nazwa danych

logFile LogFile : LogFile , który był wcześniej rejestrowany i powinien być powiązany z przypadkiem testowym.

ustawLogSaver

public void setLogSaver (ILogSaver logSaver)

Parametry
logSaver ILogSaver

testZałożenieNiepowodzenie

public void testAssumptionFailure (TestIdentifier testId, 
                String trace)

Parametry
testId TestIdentifier

trace String

test zakończony

public void testEnded (TestIdentifier testId, 
                 metrics)

Parametry
testId TestIdentifier

metrics

test zakończony

public void testEnded (TestIdentifier testId, 
                long endTime, 
                 metrics)

Parametry
testId TestIdentifier

endTime long

metrics

Test nieudany

public void testFailed (TestIdentifier testId, 
                String reason)

Parametry
testId TestIdentifier

reason String

zignorowano test

public void testIgnored (TestIdentifier testId)

Parametry
testId TestIdentifier

testLogZapisano

public void testLogSaved (String dataName, 
                LogDataType dataType, 
                InputStreamSource dataStream, 
                LogFile logFile)

Parametry
dataName String

dataType LogDataType

dataStream InputStreamSource

logFile LogFile

testModuleEnd

public void testModuleEnded ()

Zgłasza koniec uruchomienia modułu.

moduł testowyrozpoczęty

public void testModuleStarted (IInvocationContext moduleContext)

Zgłasza początek uruchomionego modułu. To wywołanie zwrotne jest powiązane z testModuleEnded() i jest opcjonalne w sekwencji. Jest używany tylko podczas biegu, który korzysta z modułów: biegaczy opartych na pakietach.

Parametry
moduleContext IInvocationContext : IInvocationContext modułu.

testRunEnded

public void testRunEnded (long time, 
                 runMetrics)

Zgłasza koniec przebiegu testowego. FIXME: Nie możemy mieć dwóch różnych interfejsów Map<>, więc musimy tutaj użyć HashMap.

Parametry
time long : czas, który upłynął od urządzenia, w milisekundach

runMetrics : pary klucz-wartość zgłaszane na koniec przebiegu testu z Metric .

testRunNie powiodło się

public void testRunFailed (String reason)

Testowanie raportów nie zostało ukończone z powodu błędu krytycznego.

Parametry
reason String : String opisujący przyczynę niepowodzenia uruchomienia.

testRunStarted

public void testRunStarted (String runName, 
                int testCount)

Zgłasza początek przebiegu testowego.

Parametry
runName String : nazwa uruchomienia testu

testCount int : całkowita liczba testów w przebiegu testu

testRozpoczęty

public void testStarted (TestIdentifier testId)

Parametry
testId TestIdentifier

testRozpoczęty

public void testStarted (TestIdentifier testId, 
                long startTime)

Parametry
testId TestIdentifier

startTime long