Google은 흑인 공동체를 위한 인종 간 평등을 진전시키기 위해 노력하고 있습니다. Google에서 어떤 노력을 하고 있는지 확인하세요.

TestFailureListener

public class TestFailureListener
extends Object implements ITestInvocationListener

java.lang.Object
   ↳ com.android.tradefed.testtype.suite.TestFailureListener


Listener used to take action such as screenshot, bugreport, logcat collection upon a test failure when requested.

Summary

Public constructors

TestFailureListener( devices, boolean bugReportOnFailure, boolean rebootOnFailure)

Public methods

void applyModuleConfiguration(boolean bugreportOnFailure)

Allows to override the invocation settings of capture on failure by the module specific configurations.

void join()

Join on all the logcat capturing threads to ensure they terminate.

void setLogger(ITestLogger logger)

Sets where the logs should be saved.

void testFailed(TestDescription test, String trace)

void testLog(String dataName, LogDataType dataType, InputStreamSource dataStream)
void testLogForward(String dataName, LogDataType dataType, InputStreamSource dataStream)

Forward the log to the logger, do not do it from whitin the #testLog callback as if TestFailureListener is part of the chain, it will results in an infinite loop.

Public constructors

TestFailureListener

public TestFailureListener ( devices, 
                boolean bugReportOnFailure, 
                boolean rebootOnFailure)

Parameters
devices

bugReportOnFailure boolean

rebootOnFailure boolean

Public methods

applyModuleConfiguration

public void applyModuleConfiguration (boolean bugreportOnFailure)

Allows to override the invocation settings of capture on failure by the module specific configurations.

Parameters
bugreportOnFailure boolean: true to capture a bugreport on test failure. False otherwise.

join

public void join ()

Join on all the logcat capturing threads to ensure they terminate.

setLogger

public void setLogger (ITestLogger logger)

Sets where the logs should be saved.

Parameters
logger ITestLogger

testFailed

public void testFailed (TestDescription test, 
                String trace)

Parameters
test TestDescription

trace String

testLog

public void testLog (String dataName, 
                LogDataType dataType, 
                InputStreamSource dataStream)

Parameters
dataName String

dataType LogDataType

dataStream InputStreamSource

testLogForward

public void testLogForward (String dataName, 
                LogDataType dataType, 
                InputStreamSource dataStream)

Forward the log to the logger, do not do it from whitin the #testLog callback as if TestFailureListener is part of the chain, it will results in an infinite loop.

Parameters
dataName String

dataType LogDataType

dataStream InputStreamSource