JUnitToInvocationResultForwarder

public class JUnitToInvocationResultForwarder
extends Object implements TestListener

java.lang.Object
   ↳ com.android.tradefed.result.JUnitToInvocationResultForwarder


A class that listens to TestListener events and forwards them to an ITestInvocationListener.

Summary

Public constructors

JUnitToInvocationResultForwarder(ITestInvocationListener invocationListener)
JUnitToInvocationResultForwarder(List<ITestInvocationListener> invocationListeners)

Public methods

void addError(Test test, Throwable t)

void addFailure(Test test, AssertionFailedError t)

void endTest(Test test, Map<String, String> metrics)

Callback from JUnit3 tests that can forward metrics.

void endTest(Test test)

void startTest(Test test)

Public constructors

JUnitToInvocationResultForwarder

JUnitToInvocationResultForwarder (ITestInvocationListener invocationListener)

Parameters
invocationListener ITestInvocationListener

JUnitToInvocationResultForwarder

JUnitToInvocationResultForwarder (List<ITestInvocationListener> invocationListeners)

Parameters
invocationListeners List

Public methods

addError

void addError (Test test, 
                Throwable t)

Parameters
test Test

t Throwable

addFailure

void addFailure (Test test, 
                AssertionFailedError t)

Parameters
test Test

t AssertionFailedError

endTest

void endTest (Test test, 
                Map<String, String> metrics)

Callback from JUnit3 tests that can forward metrics.

Parameters
test Test: The Test that just finished running.

metrics Map: The metrics in a Map format to be passed to the results callback.

endTest

void endTest (Test test)

Parameters
test Test

startTest

void startTest (Test test)

Parameters
test Test