FilteredResultForwarder
public
class
FilteredResultForwarder
extends ResultForwarder
| java.lang.Object | ||
| ↳ | com.android.tradefed.result.ResultForwarder | |
| ↳ | com.android.tradefed.result.FilteredResultForwarder | |
Variante di ResultForwarder che consente di segnalare solo una lista consentita di TestDescription.
Riepilogo
Costruttori pubblici | |
|---|---|
FilteredResultForwarder(Collection<TestDescription> allowedTests, ITestInvocationListener... listeners)
|
|
Metodi pubblici | |
|---|---|
void
|
testAssumptionFailure(TestDescription test, FailureDescription failure)
Chiamato quando un test atomico segnala che presuppone una condizione falsa |
void
|
testAssumptionFailure(TestDescription test, String trace)
Chiamato quando un test atomico segnala che presuppone una condizione falsa |
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
|
testFailed(TestDescription test, FailureDescription failure)
Segnala l'esito negativo di un singolo test case. |
void
|
testFailed(TestDescription test, String trace)
Segnala l'esito negativo di un singolo test case. |
void
|
testIgnored(TestDescription test)
Chiamato quando un test non verrà eseguito, in genere perché un metodo di test è annotato con org.junit.Ignore. |
void
|
testStarted(TestDescription test, long startTime)
Alternativa a |
void
|
testStarted(TestDescription test)
Segnala l'inizio di un singolo scenario di test. |
Costruttori pubblici
FilteredResultForwarder
public FilteredResultForwarder (Collection<TestDescription> allowedTests, ITestInvocationListener... listeners)
| Parametri | |
|---|---|
allowedTests |
Collection |
listeners |
ITestInvocationListener |
Metodi pubblici
testAssumptionFailure
public void testAssumptionFailure (TestDescription test, FailureDescription failure)
Chiamato quando un test atomico segnala che presuppone una condizione falsa
| Parametri | |
|---|---|
test |
TestDescription: identifica il test |
failure |
FailureDescription: FailureDescription che descrive l'errore e il relativo contesto. |
testAssumptionFailure
public void testAssumptionFailure (TestDescription test, String trace)
Chiamato quando un test atomico segnala che presuppone una condizione falsa
| Parametri | |
|---|---|
test |
TestDescription: identifica il test |
trace |
String: analisi dello stack dell'errore |
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 |
testFailed
public void testFailed (TestDescription test, FailureDescription failure)
Segnala l'esito negativo di un singolo test case.
Verrà chiamato tra testStarted e testEnded.
| Parametri | |
|---|---|
test |
TestDescription: identifica il test |
failure |
FailureDescription: FailureDescription che descrive l'errore e il relativo contesto. |
testFailed
public void testFailed (TestDescription test, String trace)
Segnala l'esito negativo di un singolo test case.
Verrà chiamato tra testStarted e testEnded.
| Parametri | |
|---|---|
test |
TestDescription: identifica il test |
trace |
String: analisi dello stack dell'errore |
testIgnored
public void testIgnored (TestDescription test)
Chiamato quando un test non verrà eseguito, in genere perché un metodo di test è annotato con org.junit.Ignore.
| Parametri | |
|---|---|
test |
TestDescription: identifica il test |
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 |