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 | setPackageName (String packageName) |
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 finalTIMEOUT_MESSAGES
공개 생성자
LogcatCrashResultForwarder
public LogcatCrashResultForwarder (ITestDevice device, ITestInvocationListener... listeners)
매개변수 | |
---|---|
device | ITestDevice |
listeners | ITestInvocationListener |
공개 메소드
세트패키지이름
public void setPackageName (String packageName)
매개변수 | |
---|---|
packageName | String |
테스트 종료됨
public void testEnded (TestDescription test, long endTime,testMetrics)
종료 시간을 직접 지정할 수 ERROR(/#testEnded(com.android.tradefed.result.TestDescription,Map))
의 대안입니다. 정확한 측정을 위해 testStarted(com.android.tradefed.result.TestDescription, long)
와 결합하세요.
매개변수 | |
---|---|
test | TestDescription : 테스트를 식별합니다. |
endTime | long : System.currentTimeMillis() 통해 측정된 테스트 종료 시간 |
testMetrics | ERROR(/Map) |
테스트 실패
public void testFailed (TestDescription test, FailureDescription failure)
개별 테스트 사례의 실패를 보고합니다.
testStarted와 testEnded 사이에 호출됩니다.
매개변수 | |
---|---|
test | TestDescription : 테스트를 식별합니다. |
failure | FailureDescription : 실패와 해당 컨텍스트를 설명하는 FailureDescription . |
테스트 실패
public void testFailed (TestDescription test, String trace)
개별 테스트 사례의 실패를 보고합니다.
testStarted와 testEnded 사이에 호출됩니다.
매개변수 | |
---|---|
test | TestDescription : 테스트를 식별합니다. |
trace | String : 실패 스택 추적 |
테스트실행이 종료됨
public void testRunEnded (long elapsedTime,runMetrics)
테스트 실행 종료를 보고합니다. FIXME: 서로 다른 유형의 두 개의 Map<> 인터페이스를 가질 수 없으므로 여기서는 HashMap을 사용해야 합니다.
매개변수 | |
---|---|
elapsedTime | long : 장치가 보고한 경과 시간(밀리초) |
runMetrics | Metric 사용한 테스트 실행이 끝나면 보고된 키-값 쌍입니다. |
테스트실행실패
public void testRunFailed (FailureDescription error)
FailureDescription
에 설명된 오류로 인해 보고서 테스트 실행을 완료하지 못했습니다.
매개변수 | |
---|---|
error | FailureDescription : 실패와 해당 컨텍스트를 설명하는 FailureDescription . |
테스트실행실패
public void testRunFailed (String errorMessage)
치명적인 오류로 인해 테스트 실행을 완료하지 못했습니다.
매개변수 | |
---|---|
errorMessage | String : 실행 실패 이유를 설명하는 String 입니다. |
테스트시작됨
public void testStarted (TestDescription test, long startTime)
정확한 측정을 위해 ERROR(/#testEnded(com.android.tradefed.result.TestDescription,long,Map))
와 결합하여 테스트 시작 시기도 지정하는 testStarted(com.android.tradefed.result.TestDescription)
의 대안입니다. .
매개변수 | |
---|---|
test | TestDescription : 테스트를 식별합니다. |
startTime | long : System.currentTimeMillis() 통해 측정된 테스트가 시작된 시간입니다. |