BasePostProcessor

public abstract class BasePostProcessor
extends Object implements IPostProcessor

java.lang.Object
   ↳ com.android.tradefed.postprocessor.BasePostProcessor


Podstawowa implementacja IPostProcessor, którą powinna rozszerzać każda implementacja. Upewnij się, że metody przetwarzania po przetwarzaniu są wywoływane przed metodami raportowania ostatecznych wyników.

Podsumowanie

Konstruktory publiczne

BasePostProcessor()

Metody publiczne

final ITestInvocationListener init(ITestInvocationListener listener)

Krok inicjowania postprocesora.

final void invocationEnded(long elapsedTime)
final void invocationFailed(FailureDescription failure)
final void invocationFailed(Throwable cause)
final void invocationStarted(IInvocationContext context)

Odbiorniki wywołania do przekierowywania

final boolean isDisabled()

Zwraca wartość True, jeśli cały obiekt jest wyłączony (pomijanie konfiguracji i demontażu).

final void logAssociation(String dataName, LogFile logFile)

Aktualizuje powiązanie logów z testem.

processAllTestMetricsAndLogs(ListMultimap<String, MetricMeasurement.Metric> allTestMetrics, allTestLogs)

Zastosuj tę metodę, aby agregować dane i logi ze wszystkich testów.

abstract processRunMetricsAndLogs( rawMetrics, runLogs)

Zastosuj tę metodę, aby wygenerować zestaw nowych danych na podstawie dotychczasowych danych i logów.

processTestMetricsAndLogs(TestDescription testDescription, testMetrics, testLogs)

Zastosuj tę metodę do post-processingu danych i dzienników z każdego testu.

final void setLogSaver(ILogSaver logSaver)
final void testAssumptionFailure(TestDescription test, String trace)
final void testAssumptionFailure(TestDescription test, FailureDescription failure)
final void testEnded(TestDescription test, long endTime, testMetrics)
final 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 testLog(String dataName, LogDataType dataType, InputStreamSource dataStream)

Użyj tej metody, aby zapisać plik z implementacji PostProcessor.

final void testLogSaved(String dataName, LogDataType dataType, InputStreamSource dataStream, LogFile logFile)
final void testModuleEnded()
final void testModuleStarted(IInvocationContext moduleContext)
final void testRunEnded(long elapsedTime, runMetrics)
final void testRunFailed(FailureDescription failure)
final void testRunFailed(String errorMessage)
final void testRunStarted(String runName, int testCount, int attemptNumber)
final void testRunStarted(String runName, int testCount)

Wywołania zwrotne testu

final void testRunStopped(long elapsedTime)
final void testStarted(TestDescription test, long startTime)
final void testStarted(TestDescription test)

Wywołania zwrotne elementów testowania

Chronione metody

MetricMeasurement.DataType getMetricType()

W razie potrzeby zastąp tę metodę, aby zmienić typ danych.

String getRunName()

Konstruktory publiczne

BasePostProcessor

public BasePostProcessor ()

Metody publiczne

init

public final ITestInvocationListener init (ITestInvocationListener listener)

Krok inicjowania postprocesora. Jest wywoływany przed każdym wywołaniem zwrotnym testów.

Parametry
listener ITestInvocationListener

Zwroty
ITestInvocationListener

invocationEnded

public final void invocationEnded (long elapsedTime)

Parametry
elapsedTime long

invocationFailed

public final void invocationFailed (FailureDescription failure)

Parametry
failure FailureDescription

invocationFailed

public final void invocationFailed (Throwable cause)

Parametry
cause Throwable

invocationStarted

public final void invocationStarted (IInvocationContext context)

Odbiorniki wywołania do przekierowywania

Parametry
context IInvocationContext

isDisabled

public final boolean isDisabled ()

Zwraca wartość True, jeśli cały obiekt jest wyłączony (pomijanie konfiguracji i demontażu). W przeciwnym razie ma wartość Fałsz.

Zwroty
boolean

logAssociation

public final void logAssociation (String dataName, 
                LogFile logFile)

Aktualizuje powiązanie logów z testem. Jeśli ta metoda jest wywoływana podczas testu, to dziennik należy do testu; w przeciwnym razie będzie to dziennik działania.

Parametry
dataName String

logFile LogFile

processAllTestMetricsAndLogs

public  processAllTestMetricsAndLogs (ListMultimap<String, MetricMeasurement.Metric> allTestMetrics, 
                 allTestLogs)

Zastosuj tę metodę, aby agregować dane i logi ze wszystkich testów. Dane z tej metody będą raportowane jako dane dotyczące wykonania. Powinny być zwracane tylko nowo wygenerowane dane z unikalną nazwą klucza (niedozwolone są kolizje z dotychczasowymi kluczami).

Parametry
allTestMetrics ListMultimap: tablica HashMultimap przechowująca dane z każdego testu pogrupowane według nazw danych.

allTestLogs : mapa przechowująca mapę plików dziennika każdego testu z kluczami w postaci nazw danych, przy użyciu TestDescription jako kluczy.

Zwroty
Zestaw nowo wygenerowanych danych na podstawie wszystkich danych testowych.

processRunMetricsAndLogs

public abstract  processRunMetricsAndLogs ( rawMetrics, 
                 runLogs)

Zastosuj tę metodę, aby wygenerować zestaw nowych danych na podstawie dotychczasowych danych i logów. Powinny być zwracane tylko nowo wygenerowane dane z unikalną nazwą klucza (niedozwolone są kolizje z dotychczasowymi kluczami).

Parametry
rawMetrics : zbiór danych wyjściowych dostępnych dla wykonania.

runLogs : zbiór plików dziennika z testu.

Zwroty
Zestaw nowo wygenerowanych danych na podstawie danych z wykonania.

processTestMetricsAndLogs

public  processTestMetricsAndLogs (TestDescription testDescription, 
                 testMetrics, 
                 testLogs)

Zastosuj tę metodę do post-processingu danych i dzienników z każdego testu. Powinny być zwracane tylko nowo wygenerowane dane z unikalnym kluczem (niedozwolone są kolizje z dotychczasowymi kluczami).

Parametry
testDescription TestDescription: obiekt TestDescription opisujący test.

testMetrics : zbiór danych z testu.

testLogs : zbiór plików zarejestrowanych podczas testu.

Zwroty
Zestaw nowo wygenerowanych danych na podstawie danych testowych.

setLogSaver

public final void setLogSaver (ILogSaver logSaver)

Parametry
logSaver ILogSaver

testAssumptionFailure

public final void testAssumptionFailure (TestDescription test, 
                String trace)

Parametry
test TestDescription

trace String

testAssumptionFailure

public final void testAssumptionFailure (TestDescription test, 
                FailureDescription failure)

Parametry
test TestDescription

failure FailureDescription

testEnded

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

Parametry
test TestDescription

endTime long

testMetrics

testEnded

public final void testEnded (TestDescription test, 
                 testMetrics)

Parametry
test TestDescription

testMetrics

testFailed

public final void testFailed (TestDescription test, 
                FailureDescription failure)

Parametry
test TestDescription

failure FailureDescription

testFailed

public final void testFailed (TestDescription test, 
                String trace)

Parametry
test TestDescription

trace String

testIgnored

public final void testIgnored (TestDescription test)

Parametry
test TestDescription

testLog

public final void testLog (String dataName, 
                LogDataType dataType, 
                InputStreamSource dataStream)

Użyj tej metody, aby zapisać plik z implementacji PostProcessor.

Parametry
dataName String

dataType LogDataType

dataStream InputStreamSource

testLogSaved

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

Parametry
dataName String

dataType LogDataType

dataStream InputStreamSource

logFile LogFile

testModuleEnded

public final void testModuleEnded ()

testModuleStarted

public final void testModuleStarted (IInvocationContext moduleContext)

Parametry
moduleContext IInvocationContext

testRunEnded

public final void testRunEnded (long elapsedTime, 
                 runMetrics)

Parametry
elapsedTime long

runMetrics

testRunFailed

public final void testRunFailed (FailureDescription failure)

Parametry
failure FailureDescription

testRunFailed

public final void testRunFailed (String errorMessage)

Parametry
errorMessage String

testRunStarted

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

Parametry
runName String

testCount int

attemptNumber int

testRunStarted

public final void testRunStarted (String runName, 
                int testCount)

Wywołania zwrotne testu

Parametry
runName String

testCount int

testRunStopped

public final void testRunStopped (long elapsedTime)

Parametry
elapsedTime long

testStarted

public final void testStarted (TestDescription test, 
                long startTime)

Parametry
test TestDescription

startTime long

testStarted

public final void testStarted (TestDescription test)

Wywołania zwrotne elementów testowania

Parametry
test TestDescription

Chronione metody

getMetricType

protected MetricMeasurement.DataType getMetricType ()

W razie potrzeby zastąp tę metodę, aby zmienić typ danych. Domyślnie typ danych jest ustawiony na „przetworzony”.

Zwroty
MetricMeasurement.DataType

getRunName

protected String getRunName ()

Zwroty
String