JUnitToInvocationResultForwarder
public
class
JUnitToInvocationResultForwarder
extends Object
implements
TestListener
java.lang.Object | |
↳ | com.android.tradefed.result.JUnitToInvocationResultForwarder |
Una classe che ascolta gli eventi TestListener
e li inoltra a un ITestInvocationListener
.
Riepilogo
Costruttori pubblici | |
---|---|
JUnitToInvocationResultForwarder(ITestInvocationListener invocationListener)
|
|
JUnitToInvocationResultForwarder(
|
Metodi pubblici | |
---|---|
void
|
addError(Test test, Throwable t)
|
void
|
addFailure(Test test, AssertionFailedError t)
|
void
|
endTest(Test test,
Callback dai test JUnit3 che può inoltrare le metriche. |
void
|
endTest(Test test)
|
void
|
startTest(Test test)
|
void
|
testLog(String dataName, LogDataType dataType, InputStreamSource dataStream)
Callback dal forwarder JUnit3 per ottenere i log di un test. |
Costruttori pubblici
JUnitToInvocationResultForwarder
public JUnitToInvocationResultForwarder (ITestInvocationListener invocationListener)
Parametri | |
---|---|
invocationListener |
ITestInvocationListener |
JUnitToInvocationResultForwarder
public JUnitToInvocationResultForwarder (invocationListeners)
Parametri | |
---|---|
invocationListeners |
|
Metodi pubblici
addError
public void addError (Test test, Throwable t)
Parametri | |
---|---|
test |
Test |
t |
Throwable |
addFailure
public void addFailure (Test test, AssertionFailedError t)
Parametri | |
---|---|
test |
Test |
t |
AssertionFailedError |
endTest
public void endTest (Test test,metrics)
Callback dai test JUnit3 che può inoltrare le metriche.
Parametri | |
---|---|
test |
Test : il Test che ha appena terminato l'esecuzione. |
metrics |
: le metriche in un formato Map da passare al callback dei risultati.
|
endTest
public void endTest (Test test)
Parametri | |
---|---|
test |
Test |
startTest
public void startTest (Test test)
Parametri | |
---|---|
test |
Test |
testLog
public void testLog (String dataName, LogDataType dataType, InputStreamSource dataStream)
Callback dal forwarder JUnit3 per ottenere i log di un test.
Parametri | |
---|---|
dataName |
String : un nome descrittivo della stringa dei dati, ad esempio "device_logcat". Tieni presente che dataName
potrebbe non essere univoco per ogni chiamata. Ad esempio, gli implementatori devono essere in grado di gestire più chiamate
con lo stesso dataName |
dataType |
LogDataType : il tipo di dati LogDataType |
dataStream |
InputStreamSource : l'InputStreamSource dei dati. Gli implementatori devono chiamare
createInputStream per iniziare a leggere i dati e assicurarsi di chiudere il
flusso di input risultante al termine. Gli utenti che chiamano devono assicurarsi che l'origine dei dati rimanga presente
e accessibile fino al completamento del metodo testLog.
|