LegacySubprocessResultsReporter

public final class LegacySubprocessResultsReporter
extends SubprocessResultsReporter

java.lang.Object
   ↳ com.android.tradefed.result.SubprocessResultsReporter
     ↳ com.android.tradefed.result.LegacySubprocessResultsReporter


Zamrożona implementacja narzędzia do raportowania wyników podprocesu, która powinna pozostać zgodna z wcześniejszymi wersjami TF/CTS (np. 8+), pomimo zmian w jej klasie nadrzędnej.

Ten moduł raportujący można wstrzykiwać dynamicznie, aby włączyć w starszych pakietach testów opartych na TF funkcję raportowania procesów podrzędnych.

Podsumowanie

Konstruktory publiczne

LegacySubprocessResultsReporter()

Konstruktory chronione

LegacySubprocessResultsReporter(boolean installHandler)

Metody publiczne

void invocationEnded(long elapsedTime)

Informuje, że wywołanie zostało zakończone, niezależnie od tego, czy zakończyło się ono pomyślnie, czy 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 dziennik musi być ściśle powiązany z przypadkami testowymi, ale nie można tego zrobić w bezpośrednim wywołaniu zwrotnym testLogSaved(String,LogDataType,InputStreamSource,LogFile).

void setLogSaver(ILogSaver logSaver)
void testAssumptionFailure(TestIdentifier testId, String trace)
void testEnded(TestIdentifier testId, long endTime, Map<String, String> metrics)
void testEnded(TestIdentifier testId, Map<String, String> 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 zakończenie działania modułu.

void testModuleStarted(IInvocationContext moduleContext)

Zgłasza rozpoczęcie działania modułu.

void testRunEnded(long time, Map<String, String> runMetrics)
void testRunFailed(String reason)

Zgłasza, że nie udało się ukończyć sesji testowej z powodu błędu krytycznego.

void testRunStarted(String runName, int testCount)

Zgłasza rozpoczęcie sesji testowej.

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

Konstruktory publiczne

LegacySubprocessResultsReporter

public LegacySubprocessResultsReporter ()

Konstruktory chronione

LegacySubprocessResultsReporter

protected LegacySubprocessResultsReporter (boolean installHandler)

Parametry
installHandler boolean

Metody publiczne

invocationEnded

public void invocationEnded (long elapsedTime)

Informuje, że wywołanie zostało zakończone, niezależnie od tego, czy zakończyło się ono pomyślnie, czy z powodu błędu.

Zostanie automatycznie wywołana przez platformę TradeFederation.

Parametry
elapsedTime long: czas trwania wywołania w milisekundach.

invocationFailed

public void invocationFailed (Throwable cause)

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

Zostanie automatycznie wywołana przez platformę TradeFederation.

Parametry
cause Throwable: Throwable przyczyna niepowodzenia

invocationStarted

public void invocationStarted (IBuildInfo buildInfo)

Parametry
buildInfo IBuildInfo

logAssociation

public void logAssociation (String dataName, 
                LogFile logFile)

W niektórych przypadkach dziennik musi być ściśle powiązany z przypadkami testowymi, ale nie można tego zrobić w bezpośrednim wywołaniu zwrotnym testLogSaved(String,LogDataType,InputStreamSource,LogFile). Dzięki temu wywołaniu zwrotnemu można wyraźnie określić silne powiązanie.

Parametry
dataName String: nazwa danych

logFile LogFile: LogFile, który został zarejestrowany wcześniej i powinien być powiązany z elementem testowania.

setLogSaver

public void setLogSaver (ILogSaver logSaver)

Parametry
logSaver ILogSaver

testAssumptionFailure

public void testAssumptionFailure (TestIdentifier testId, 
                String trace)

Parametry
testId TestIdentifier

trace String

testEnded

public void testEnded (TestIdentifier testId, 
                long endTime, 
                Map<String, String> metrics)

Parametry
testId TestIdentifier

endTime long

metrics Map

testEnded

public void testEnded (TestIdentifier testId, 
                Map<String, String> metrics)

Parametry
testId TestIdentifier

metrics Map

testFailed

public void testFailed (TestIdentifier testId, 
                String reason)

Parametry
testId TestIdentifier

reason String

testIgnored

public void testIgnored (TestIdentifier testId)

Parametry
testId TestIdentifier

testLogSaved

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

Parametry
dataName String

dataType LogDataType

dataStream InputStreamSource

logFile LogFile

testModuleEnded

public void testModuleEnded ()

Zgłasza zakończenie działania modułu.

testModuleStarted

public void testModuleStarted (IInvocationContext moduleContext)

Zgłasza rozpoczęcie działania modułu. Ten wywołanie zwrotne jest powiązane z elementem testModuleEnded() i jest opcjonalne w sekwencji. Jest używany tylko podczas uruchamiania modułów: narzędzi uruchamiających opartych na pakietach.

Parametry
moduleContext IInvocationContext: IInvocationContext modułu.

testRunEnded

public void testRunEnded (long time, 
                Map<String, String> runMetrics)

Parametry
time long

runMetrics Map

testRunFailed

public void testRunFailed (String reason)

Zgłasza, że nie udało się ukończyć sesji testowej z powodu błędu krytycznego.

Parametry
reason String: String opisuje przyczynę niepowodzenia uruchomienia.

testRunStarted

public void testRunStarted (String runName, 
                int testCount)

Zgłasza rozpoczęcie sesji testowej.

Parametry
runName String: nazwa sesji testowej

testCount int: łączna liczba testów podczas sesji testowej

testStarted

public void testStarted (TestIdentifier testId)

Parametry
testId TestIdentifier

testStarted

public void testStarted (TestIdentifier testId, 
                long startTime)

Parametry
testId TestIdentifier

startTime long