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 | ||
Asystent zajęć, który wykrywa brakujące rozpoczęcie i zakończenie biegu.
Podsumowanie
Pola | |
|---|---|
public
TestDescription |
mCurrentTest
|
public
boolean |
mRunEndedReported
|
public
boolean |
mRunStartReported
|
public
boolean |
mTestInProgress
|
Metody publiczne | |
|---|---|
void
|
testEnded(TestDescription test, long endTime, Map<String, String> testMetrics)
|
void
|
testEnded(TestDescription test, long endTime, HashMap<String, MetricMeasurement.Metric> testMetrics)
Alternatywa dla |
void
|
testEnded(TestDescription test, Map<String, String> testMetrics)
|
void
|
testEnded(TestDescription test, HashMap<String, MetricMeasurement.Metric> testMetrics)
Zgłasza zakończenie wykonania pojedynczego elementu testowania. |
void
|
testRunEnded(long elapsedTimeMillis, Map<String, String> runMetrics)
|
void
|
testRunEnded(long elapsedTime, HashMap<String, MetricMeasurement.Metric> runMetrics)
Zgłasza zakończenie sesji testowej. |
void
|
testRunStarted(String runName, int testCount)
Zgłasza rozpoczęcie sesji testowej. |
void
|
testRunStarted(String runName, int testCount, int attemptNumber, long startTime)
Zgłasza rozpoczęcie sesji testowej. |
void
|
testRunStarted(String runName, int testCount, int attemptNumber)
Zgłasza rozpoczęcie sesji testowej. |
void
|
testStarted(TestDescription test, long startTime)
Alternatywa dla |
void
|
testStarted(TestDescription test)
Zgłasza rozpoczęcie pojedynczego elementu testowania. |
Pola
mRunEndedReported
public boolean mRunEndedReported
mRunStartReported
public boolean mRunStartReported
mTestInProgress
public boolean mTestInProgress
Metody publiczne
testEnded
public void testEnded (TestDescription test, long endTime, Map<String, String> testMetrics)
| Parametry | |
|---|---|
test |
TestDescription |
endTime |
long |
testMetrics |
Map |
testEnded
public void testEnded (TestDescription test, long endTime, HashMap<String, MetricMeasurement.Metric> testMetrics)
Alternatywa dla testEnded(TestDescription,Map), w której możemy bezpośrednio określić czas zakończenia. Łącz z testStarted(TestDescription,long), aby uzyskać dokładne pomiary.
| Parametry | |
|---|---|
test |
TestDescription: identyfikuje test |
endTime |
long: czas zakończenia testu mierzony za pomocą System.currentTimeMillis() |
testMetrics |
HashMap: Map danych wygenerowanych |
testEnded
public void testEnded (TestDescription test, Map<String, String> testMetrics)
| Parametry | |
|---|---|
test |
TestDescription |
testMetrics |
Map |
testEnded
public void testEnded (TestDescription test, HashMap<String, MetricMeasurement.Metric> testMetrics)
Zgłasza zakończenie wykonania pojedynczego elementu testowania.
Jeśli funkcja testFailed(TestDescription, FailureDescription) nie została wywołana, test uznaje się za zaliczony. Zwraca też wszystkie dane klucz/wartość, które mogły zostać wyemitowane podczas wykonywania elementu testowania.
| Parametry | |
|---|---|
test |
TestDescription: identyfikuje test |
testMetrics |
HashMap: Map danych wygenerowanych |
testRunEnded
public void testRunEnded (long elapsedTimeMillis,
Map<String, String> runMetrics)| Parametry | |
|---|---|
elapsedTimeMillis |
long |
runMetrics |
Map |
testRunEnded
public void testRunEnded (long elapsedTime,
HashMap<String, MetricMeasurement.Metric> runMetrics)Zgłasza zakończenie sesji testowej. FIXME: Nie możemy mieć dwóch interfejsów Map<> z różnymi typami, więc musimy tutaj użyć HashMap.
| Parametry | |
|---|---|
elapsedTime |
long: czas, który upłynął od ostatniego zgłoszenia przez urządzenie (w milisekundach) |
runMetrics |
HashMap: pary klucz/wartość zgłaszane na zakończenie sesji testowej z parametrem Metric. |
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 |
testRunStarted
public void testRunStarted (String runName,
int testCount,
int attemptNumber,
long startTime)Zgłasza rozpoczęcie sesji testowej.
| Parametry | |
|---|---|
runName |
String: nazwa sesji testowej |
testCount |
int: łączna liczba testów podczas sesji testowej |
attemptNumber |
int: numer zamówienia, który identyfikuje różne próby tego samego uruchomienia runName
wykonywanego wielokrotnie. Wartość attemptNumber jest indeksowana od zera i powinna zwiększać się za każdym razem, gdy następuje nowe uruchomienie. Na przykład jeśli test jest ponownie uruchamiany 3 razy, powinien mieć łącznie 4 uruchomienia pod tą samą nazwą runName, a wartość attemptNumber powinna wynosić od 0 do 3. |
startTime |
long: czas rozpoczęcia uruchomienia mierzony za pomocą System.currentTimeMillis() |
testRunStarted
public void testRunStarted (String runName,
int testCount,
int attemptNumber)Zgłasza rozpoczęcie sesji testowej.
| Parametry | |
|---|---|
runName |
String: nazwa sesji testowej |
testCount |
int: łączna liczba testów podczas sesji testowej |
attemptNumber |
int: numer zamówienia, który identyfikuje różne próby tego samego uruchomienia runName
wykonywanego wielokrotnie. Numer próby jest indeksowany od 0 i powinien zwiększać się za każdym razem, gdy następuje nowe uruchomienie. Przykład: test jest ponownie uruchamiany 3 razy, więc powinien mieć łącznie 4 uruchomienia pod tą samą nazwą uruchomienia, a numer próby powinien wynosić od 0 do 3. |
testStarted
public void testStarted (TestDescription test, long startTime)
Alternatywa dla testStarted(TestDescription), w której podajemy też datę rozpoczęcia testu, w połączeniu z testEnded(TestDescription,long,Map), aby uzyskać dokładny pomiar.
| Parametry | |
|---|---|
test |
TestDescription: identyfikuje test |
startTime |
long: czas rozpoczęcia testu mierzony za pomocą System.currentTimeMillis() |
testStarted
public void testStarted (TestDescription test)
Zgłasza rozpoczęcie pojedynczego elementu testowania. Jest to starszy interfejs; o ile to możliwe, używaj testStarted(TestDescription).
| Parametry | |
|---|---|
test |
TestDescription: identyfikuje test |