LogcatCrashResultForwarder

public class LogcatCrashResultForwarder
extends ResultForwarder

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


特殊监听器:在发生失败(插桩进程崩溃)时,它会尝试从 Logcat 中提取崩溃信息,并将其添加到与测试关联的失败消息中。

摘要

常量

int MAX_NUMBER_CRASH

字段

public static final String ERROR_MESSAGE

当设备端出现问题时,来自插桩的特殊错误消息。

public static final String INCOMPLETE_MESSAGE

public static final String SYSTEM_CRASH_MESSAGE

public static final TIMEOUT_MESSAGES

公共构造函数

LogcatCrashResultForwarder(ITestDevice device, ITestInvocationListener... listeners)

公共方法

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)

常量

MAX_NUMBER_CRASH

public static final int MAX_NUMBER_CRASH

常量值: 3 (0x00000003)

字段

ERROR_MESSAGE

public static final String ERROR_MESSAGE

当设备端出现问题时,来自插桩的特殊错误消息。

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

公共构造函数

LogcatCrashResultForwarder

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

参数
device ITestDevice

listeners ITestInvocationListener

公共方法

getDevice

public ITestDevice getDevice ()

返回
ITestDevice

testEnded

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

参数
test TestDescription

endTime long

testMetrics

testFailed

public void testFailed (TestDescription test, 
                FailureDescription failure)

参数
test TestDescription

failure FailureDescription

testFailed

public void testFailed (TestDescription test, 
                String trace)

参数
test TestDescription

trace String

testRunEnded

public void testRunEnded (long elapsedTime, 
                 runMetrics)

参数
elapsedTime long

runMetrics

testRunFailed

public void testRunFailed (FailureDescription error)

参数
error FailureDescription

testRunFailed

public void testRunFailed (String errorMessage)

参数
errorMessage String

testStarted

public void testStarted (TestDescription test, 
                long startTime)

参数
test TestDescription

startTime long