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

裝置端發生問題時,檢測作業發出的特殊錯誤訊息。

未完成訊息

public static final String INCOMPLETE_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

測試結束

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

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