FilteredResultForwarder
public
class
FilteredResultForwarder
extends ResultForwarder
| java.lang.Object | ||
| ↳ | com.android.tradefed.result.ResultForwarder | |
| ↳ | com.android.tradefed.result.FilteredResultForwarder | |
Wariant ResultForwarder, który umożliwia zgłaszanie tylko TestDescription z listy dozwolonych.
Podsumowanie
Konstruktory publiczne | |
|---|---|
FilteredResultForwarder(Collection<TestDescription> allowedTests, ITestInvocationListener... listeners)
|
|
Metody publiczne | |
|---|---|
void
|
testAssumptionFailure(TestDescription test, FailureDescription failure)
Wywoływana, gdy test atomowy zgłasza, że zakłada warunek, który jest fałszywy |
void
|
testAssumptionFailure(TestDescription test, String trace)
Wywoływana, gdy test atomowy zgłasza, że zakłada warunek, który jest fałszywy |
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
|
testFailed(TestDescription test, FailureDescription failure)
Zgłasza niepowodzenie pojedynczego elementu testowania. |
void
|
testFailed(TestDescription test, String trace)
Zgłasza niepowodzenie pojedynczego elementu testowania. |
void
|
testIgnored(TestDescription test)
Wywoływana, gdy test nie zostanie uruchomiony, zwykle dlatego, że metoda testowa jest oznaczona adnotacją org.junit.Ignore. |
void
|
testStarted(TestDescription test, long startTime)
Alternatywa dla |
void
|
testStarted(TestDescription test)
Zgłasza rozpoczęcie pojedynczego elementu testowania. |
Konstruktory publiczne
FilteredResultForwarder
public FilteredResultForwarder (Collection<TestDescription> allowedTests, ITestInvocationListener... listeners)
| Parametry | |
|---|---|
allowedTests |
Collection |
listeners |
ITestInvocationListener |
Metody publiczne
testAssumptionFailure
public void testAssumptionFailure (TestDescription test, FailureDescription failure)
Wywoływana, gdy test atomowy zgłasza, że zakłada warunek, który jest fałszywy
| Parametry | |
|---|---|
test |
TestDescription: identyfikuje test |
failure |
FailureDescription: FailureDescription opisuje błąd i jego kontekst. |
testAssumptionFailure
public void testAssumptionFailure (TestDescription test, String trace)
Wywoływana, gdy test atomowy zgłasza, że zakłada warunek, który jest fałszywy
| Parametry | |
|---|---|
test |
TestDescription: identyfikuje test |
trace |
String: zrzut stosu błędu |
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 |
testFailed
public void testFailed (TestDescription test, FailureDescription failure)
Zgłasza niepowodzenie pojedynczego elementu testowania.
Wywoływana między testStarted a testEnded.
| Parametry | |
|---|---|
test |
TestDescription: identyfikuje test |
failure |
FailureDescription: FailureDescription opisuje błąd i jego kontekst. |
testFailed
public void testFailed (TestDescription test, String trace)
Zgłasza niepowodzenie pojedynczego elementu testowania.
Wywoływana między testStarted a testEnded.
| Parametry | |
|---|---|
test |
TestDescription: identyfikuje test |
trace |
String: zrzut stosu błędu |
testIgnored
public void testIgnored (TestDescription test)
Wywoływana, gdy test nie zostanie uruchomiony, zwykle dlatego, że metoda testowa jest oznaczona adnotacją org.junit.Ignore.
| Parametry | |
|---|---|
test |
TestDescription: identyfikuje test |
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 |