GranularRetriableTestWrapper.StartEndCollector
public
class
GranularRetriableTestWrapper.StartEndCollector
extends ResultAndLogForwarder
| java.lang.Object | |||
| ↳ | com.android.tradefed.result.ResultForwarder | ||
| ↳ | com.android.tradefed.result.ResultAndLogForwarder | ||
| ↳ | com.android.tradefed.testtype.suite.GranularRetriableTestWrapper.StartEndCollector | ||
Assistente per la lezione per rilevare l'inizio e la fine delle corse mancanti.
Riepilogo
Campi | |
|---|---|
public
TestDescription |
mCurrentTest
|
public
boolean |
mRunEndedReported
|
public
boolean |
mRunStartReported
|
public
boolean |
mTestInProgress
|
Metodi pubblici | |
|---|---|
void
|
testEnded(TestDescription test, long endTime, Map<String, String> testMetrics)
|
void
|
testEnded(TestDescription test, long endTime, HashMap<String, MetricMeasurement.Metric> testMetrics)
Alternativa a |
void
|
testEnded(TestDescription test, Map<String, String> testMetrics)
|
void
|
testEnded(TestDescription test, HashMap<String, MetricMeasurement.Metric> testMetrics)
Segnala la fine dell'esecuzione di un singolo scenario di test. |
void
|
testRunEnded(long elapsedTimeMillis, Map<String, String> runMetrics)
|
void
|
testRunEnded(long elapsedTime, HashMap<String, MetricMeasurement.Metric> runMetrics)
Segnala la fine dell'esecuzione del test. |
void
|
testRunStarted(String runName, int testCount)
Segnala l'inizio di un'esecuzione di test. |
void
|
testRunStarted(String runName, int testCount, int attemptNumber, long startTime)
Segnala l'inizio di un'esecuzione di test. |
void
|
testRunStarted(String runName, int testCount, int attemptNumber)
Segnala l'inizio di un'esecuzione di test. |
void
|
testStarted(TestDescription test, long startTime)
Alternativa a |
void
|
testStarted(TestDescription test)
Segnala l'inizio di un singolo scenario di test. |
Campi
mRunEndedReported
public boolean mRunEndedReported
mRunStartReported
public boolean mRunStartReported
mTestInProgress
public boolean mTestInProgress
Metodi pubblici
testEnded
public void testEnded (TestDescription test, long endTime, Map<String, String> testMetrics)
| Parametri | |
|---|---|
test |
TestDescription |
endTime |
long |
testMetrics |
Map |
testEnded
public void testEnded (TestDescription test, long endTime, HashMap<String, MetricMeasurement.Metric> testMetrics)
Alternativa a testEnded(TestDescription,Map) in cui possiamo specificare direttamente l'ora di fine. Combina con testStarted(TestDescription,long) per una misurazione accurata.
| Parametri | |
|---|---|
test |
TestDescription: identifica il test |
endTime |
long: l'ora in cui è terminato il test, misurata tramite System.currentTimeMillis() |
testMetrics |
HashMap: un Map delle metriche emesse |
testEnded
public void testEnded (TestDescription test, Map<String, String> testMetrics)
| Parametri | |
|---|---|
test |
TestDescription |
testMetrics |
Map |
testEnded
public void testEnded (TestDescription test, HashMap<String, MetricMeasurement.Metric> testMetrics)
Segnala la fine dell'esecuzione di un singolo scenario di test.
Se testFailed(TestDescription, FailureDescription) non è stato richiamato, questo test è stato superato. Restituisce anche eventuali metriche chiave/valore
che potrebbero essere state emesse durante l'esecuzione dello scenario di test.
| Parametri | |
|---|---|
test |
TestDescription: identifica il test |
testMetrics |
HashMap: un Map delle metriche emesse |
testRunEnded
public void testRunEnded (long elapsedTimeMillis,
Map<String, String> runMetrics)| Parametri | |
|---|---|
elapsedTimeMillis |
long |
runMetrics |
Map |
testRunEnded
public void testRunEnded (long elapsedTime,
HashMap<String, MetricMeasurement.Metric> runMetrics)Segnala la fine dell'esecuzione del test. FIXME: We cannot have two Map<> interfaces with different type, so we have to use HashMap here.
| Parametri | |
|---|---|
elapsedTime |
long: tempo trascorso segnalato dal dispositivo, in millisecondi |
runMetrics |
HashMap: coppie chiave-valore riportate alla fine di un'esecuzione del test con Metric. |
testRunStarted
public void testRunStarted (String runName,
int testCount)Segnala l'inizio di un'esecuzione di test.
| Parametri | |
|---|---|
runName |
String: il nome dell'esecuzione di test |
testCount |
int: numero totale di test nell'esecuzione del test |
testRunStarted
public void testRunStarted (String runName,
int testCount,
int attemptNumber,
long startTime)Segnala l'inizio di un'esecuzione di test.
| Parametri | |
|---|---|
runName |
String: il nome dell'esecuzione di test |
testCount |
int: numero totale di test nell'esecuzione del test |
attemptNumber |
int: numero d'ordine, che identifica i diversi tentativi dello stesso runName
eseguiti più volte. attemptNumber è indicizzato a 0 e deve aumentare ogni volta che
viene eseguita una nuova esecuzione. Ad esempio, un test viene ritentato in modo granulare 3 volte, deve avere 4 esecuzioni totali
con lo stesso runName e attemptNumber va da 0 a 3. |
startTime |
long: l'ora di inizio della corsa, misurata tramite System.currentTimeMillis() |
testRunStarted
public void testRunStarted (String runName,
int testCount,
int attemptNumber)Segnala l'inizio di un'esecuzione di test.
| Parametri | |
|---|---|
runName |
String: il nome dell'esecuzione di test |
testCount |
int: numero totale di test nell'esecuzione del test |
attemptNumber |
int: numero d'ordine, che identifica i diversi tentativi dello stesso runName
eseguiti più volte. attemptNumber è indicizzato a 0 e deve aumentare ogni volta
che viene eseguita una nuova esecuzione. Ad esempio, un test viene ritentato in modo granulare 3 volte, deve avere 4 esecuzioni
totali con lo stesso runName e attemptNumber va da 0 a 3. |
testStarted
public void testStarted (TestDescription test, long startTime)
Alternativa a testStarted(TestDescription), in cui specifichiamo anche quando è iniziato il test, combinata con testEnded(TestDescription,long,Map) per una misurazione accurata.
| Parametri | |
|---|---|
test |
TestDescription: identifica il test |
startTime |
long: l'ora di inizio del test, misurata tramite System.currentTimeMillis() |
testStarted
public void testStarted (TestDescription test)
Segnala l'inizio di un singolo scenario di test. Interfaccia precedente, deve utilizzare testStarted(TestDescription) quando possibile.
| Parametri | |
|---|---|
test |
TestDescription: identifica il test |