FilteredResultForwarder
public
class
FilteredResultForwarder
extends ResultForwarder
| java.lang.Object | ||
| ↳ | com.android.tradefed.result.ResultForwarder | |
| ↳ | com.android.tradefed.result.FilteredResultForwarder | |
Variante de ResultForwarder que permite apenas que uma lista de permissão de TestDescription seja informada.
Resumo
Construtores públicos | |
|---|---|
FilteredResultForwarder(Collection<TestDescription> allowedTests, ITestInvocationListener... listeners)
|
|
Métodos públicos | |
|---|---|
void
|
testAssumptionFailure(TestDescription test, FailureDescription failure)
Chamado quando um teste atômico sinaliza que ele pressupõe uma condição falsa. |
void
|
testAssumptionFailure(TestDescription test, String trace)
Chamado quando um teste atômico sinaliza que ele pressupõe uma condição 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)
Informa o fim da execução de um caso de teste individual. |
void
|
testFailed(TestDescription test, FailureDescription failure)
Informa a falha de um caso de teste individual. |
void
|
testFailed(TestDescription test, String trace)
Informa a falha de um caso de teste individual. |
void
|
testIgnored(TestDescription test)
Chamado quando um teste não é executado, geralmente porque um método de teste é anotado com org.junit.Ignore. |
void
|
testStarted(TestDescription test, long startTime)
Alternativa a |
void
|
testStarted(TestDescription test)
Informa o início de um caso de teste individual. |
Construtores públicos
FilteredResultForwarder
public FilteredResultForwarder (Collection<TestDescription> allowedTests, ITestInvocationListener... listeners)
| Parâmetros | |
|---|---|
allowedTests |
Collection |
listeners |
ITestInvocationListener |
Métodos públicos
testAssumptionFailure
public void testAssumptionFailure (TestDescription test, FailureDescription failure)
Chamado quando um teste atômico sinaliza que ele pressupõe uma condição falsa.
| Parâmetros | |
|---|---|
test |
TestDescription: identifica o teste. |
failure |
FailureDescription: FailureDescription que descreve a falha e o contexto dela. |
testAssumptionFailure
public void testAssumptionFailure (TestDescription test, String trace)
Chamado quando um teste atômico sinaliza que ele pressupõe uma condição falsa.
| Parâmetros | |
|---|---|
test |
TestDescription: identifica o teste. |
trace |
String: stack trace da falha |
testEnded
public void testEnded (TestDescription test, long endTime, Map<String, String> testMetrics)
| Parâmetros | |
|---|---|
test |
TestDescription |
endTime |
long |
testMetrics |
Map |
testEnded
public void testEnded (TestDescription test, long endTime, HashMap<String, MetricMeasurement.Metric> testMetrics)
Alternativa a testEnded(TestDescription,Map) em que podemos especificar o horário de término diretamente. Combine com testStarted(TestDescription,long) para uma medição precisa.
| Parâmetros | |
|---|---|
test |
TestDescription: identifica o teste. |
endTime |
long: o horário em que o teste terminou, medido por System.currentTimeMillis() |
testMetrics |
HashMap: uma Map das métricas emitidas |
testEnded
public void testEnded (TestDescription test, Map<String, String> testMetrics)
| Parâmetros | |
|---|---|
test |
TestDescription |
testMetrics |
Map |
testEnded
public void testEnded (TestDescription test, HashMap<String, MetricMeasurement.Metric> testMetrics)
Informa o fim da execução de um caso de teste individual.
Se testFailed(TestDescription, FailureDescription) não foi invocado, o teste foi aprovado. Também retorna todas as métricas de chave/valor que podem ter sido emitidas durante a execução do caso de teste.
| Parâmetros | |
|---|---|
test |
TestDescription: identifica o teste. |
testMetrics |
HashMap: uma Map das métricas emitidas |
testFailed
public void testFailed (TestDescription test, FailureDescription failure)
Informa a falha de um caso de teste individual.
Será chamado entre testStarted e testEnded.
| Parâmetros | |
|---|---|
test |
TestDescription: identifica o teste. |
failure |
FailureDescription: FailureDescription que descreve a falha e o contexto dela. |
testFailed
public void testFailed (TestDescription test, String trace)
Informa a falha de um caso de teste individual.
Será chamado entre testStarted e testEnded.
| Parâmetros | |
|---|---|
test |
TestDescription: identifica o teste. |
trace |
String: stack trace da falha |
testIgnored
public void testIgnored (TestDescription test)
Chamado quando um teste não é executado, geralmente porque um método de teste é anotado com org.junit.Ignore.
| Parâmetros | |
|---|---|
test |
TestDescription: identifica o teste. |
testStarted
public void testStarted (TestDescription test, long startTime)
Alternativa a testStarted(TestDescription) em que também especificamos quando o teste foi
iniciado, combinado com testEnded(TestDescription,long,Map) para uma medição precisa.
| Parâmetros | |
|---|---|
test |
TestDescription: identifica o teste. |
startTime |
long: o horário em que o teste começou, medido por System.currentTimeMillis() |
testStarted
public void testStarted (TestDescription test)
Informa o início de um caso de teste individual. Interface mais antiga. Use testStarted(TestDescription) sempre que possível.
| Parâmetros | |
|---|---|
test |
TestDescription: identifica o teste. |