LogcatCrashResultForwarder

public class LogcatCrashResultForwarder
extends ResultForwarder

java.lang.Object
   ↳ com.android.tradefed.result.ResultForwarder
     ↳ com.android.tradefed.result.LogcatCrashResultForwarder


Special listener: on failures (instrumentation process crashing) it will attempt to extract from the logcat the crash and adds it to the failure message associated with the test.

Summary

Constants

int MAX_NUMBER_CRASH

Fields

public static final String ERROR_MESSAGE

Special error message from the instrumentation when something goes wrong on device side.

public static final String INCOMPLETE_MESSAGE

public static final String SYSTEM_CRASH_MESSAGE

public static final TIMEOUT_MESSAGES

Public constructors

LogcatCrashResultForwarder(ITestDevice device, ITestInvocationListener... listeners)

Public methods

ITestDevice getDevice()
void testEnded(TestDescription test, long endTime, testMetrics)

void testFailed(TestDescription test, FailureDescription failure)

void testFailed(TestDescription test, String trace)

void testRunEnded(long elapsedTime, runMetrics)

void testRunFailed(FailureDescription error)

void testRunFailed(String errorMessage)

void testStarted(TestDescription test, long startTime)

Constants

MAX_NUMBER_CRASH

public static final int MAX_NUMBER_CRASH

Constant Value: 3 (0x00000003)

Fields

ERROR_MESSAGE

public static final String ERROR_MESSAGE

Special error message from the instrumentation when something goes wrong on device side.

INCOMPLETE_MESSAGE

public static final String INCOMPLETE_MESSAGE

SYSTEM_CRASH_MESSAGE

public static final String SYSTEM_CRASH_MESSAGE

TIMEOUT_MESSAGES

public static final  TIMEOUT_MESSAGES

Public constructors

LogcatCrashResultForwarder

public LogcatCrashResultForwarder (ITestDevice device, 
                ITestInvocationListener... listeners)

Parameters
device ITestDevice

listeners ITestInvocationListener

Public methods

getDevice

public ITestDevice getDevice ()

Returns
ITestDevice

testEnded

public void testEnded (TestDescription test, 
                long endTime, 
                 testMetrics)

Parameters
test TestDescription

endTime long

testMetrics

testFailed

public void testFailed (TestDescription test, 
                FailureDescription failure)

Parameters
test TestDescription

failure FailureDescription

testFailed

public void testFailed (TestDescription test, 
                String trace)

Parameters
test TestDescription

trace String

testRunEnded

public void testRunEnded (long elapsedTime, 
                 runMetrics)

Parameters
elapsedTime long

runMetrics

testRunFailed

public void testRunFailed (FailureDescription error)

Parameters
error FailureDescription

testRunFailed

public void testRunFailed (String errorMessage)

Parameters
errorMessage String

testStarted

public void testStarted (TestDescription test, 
                long startTime)

Parameters
test TestDescription

startTime long