Google 致力于为黑人社区推动种族平等。查看具体举措

LogcatCrashResultForwarder

public class LogcatCrashResultForwarder
extends ResultForwarder

对象
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) testEnded (TestDescription test, long endTime, testMetrics)

void testFailed (TestDescription test, FailureDescription failure)

void testFailed (TestDescription test, String trace)

void testRunEnded (long elapsedTime, runMetrics) 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)

字段

错误信息

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

公共方法

获取设备

public ITestDevice getDevice ()

退货
ITestDevice

测试结束

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

参数
test TestDescription

endTime long

testMetrics

测试失败

public void testFailed (TestDescription test, 
                FailureDescription failure)

参数
test TestDescription

failure FailureDescription

测试失败

public void testFailed (TestDescription test, 
                String trace)

参数
test TestDescription

trace String

测试运行结束

public void testRunEnded (long elapsedTime, 
                 runMetrics)

参数
elapsedTime long

runMetrics

测试运行失败

public void testRunFailed (FailureDescription error)

参数
error FailureDescription

测试运行失败

public void testRunFailed (String errorMessage)

参数
errorMessage String

测试开始

public void testStarted (TestDescription test, 
                long startTime)

参数
test TestDescription

startTime long