JarHostTest.HostTestListener

public class JarHostTest.HostTestListener
extends ResultForwarder

java.lang.Object
com.android.tradefed.result.ResultForwarder
  com.android.compatibility.common.tradefed.testtype.JarHostTest.HostTestListener


Owijający odbiornik, który przekazuje wszystkie zdarzenia z wyjątkiem testRunStarted() i testRunEnded() do wbudowanego odbiornika. Każda klasa testowa w pliku JAR będzie wywoływać te zdarzenia, które HostTestListener wstrzymuje przed odbiornikami na potrzeby rejestrowania w konsoli i raportowania wyników.

Podsumowanie

Konstruktory publiczne

HostTestListener(ITestInvocationListener listener)

Metody publiczne

void testRunEnded(long elapsedTime, Map<String, String> metrics)

void testRunEnded(long elapsedTime, HashMap<String, MetricMeasurement.Metric> metrics)

Zgłasza zakończenie sesji testowej.

void testRunStarted(String name, int numTests)

Zgłasza rozpoczęcie sesji testowej.

Konstruktory publiczne

HostTestListener

public HostTestListener (ITestInvocationListener listener)

Parametry
listener ITestInvocationListener

Metody publiczne

testRunEnded

public void testRunEnded (long elapsedTime, 
                Map<String, String> metrics)

Parametry
elapsedTime long

metrics Map

testRunEnded

public void testRunEnded (long elapsedTime, 
                HashMap<String, MetricMeasurement.Metric> metrics)

Zgłasza zakończenie sesji testowej. FIXME: nie możemy mieć 2 interfejsów Map<> z różnymi typami, więc musimy użyć tutaj HashMap.

Parametry
elapsedTime long: czas, który upłynął, zgłoszony przez urządzenie w milisekundach

metrics HashMap: pary klucz/wartość zgłaszane na zakończenie sesji testowej z Metric.

testRunStarted

public void testRunStarted (String name, 
                int numTests)

Zgłasza rozpoczęcie sesji testowej.

Parametry
name String: nazwa sesji testowej

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