ProtoResultReporter

public abstract class ProtoResultReporter
extends Object implements ILogSaverListener, ISupportGranularResults, ITestInvocationListener

java.lang.Object의 클래스
   ↳ com.android.tradefed.result.proto.ProtoResultReporter)


결과 보고자는 모든 결과가 포함된 TestRecord protobuf를 빌드합니다. 다음과 같아야 함 processFinalProto(com.android.tradefed.result.proto.TestRecordProto.TestRecord)의 최종 proto로 할 작업을 처리하도록 확장되었습니다.

요약

공개 생성자

ProtoResultReporter()

공개 메서드

final void invocationEnded(long elapsedTime)

성공적으로 또는 일부 오류로 인해 호출이 종료되었음을 보고합니다. 있습니다.

void invocationFailed(FailureDescription failure)

일부 오류 상태로 인해 불완전한 호출을 보고합니다.

void invocationFailed(Throwable cause)

일부 오류 상태로 인해 불완전한 호출을 보고합니다.

void invocationSkipped(SkipReason reason)

호출을 건너뛴 것으로 보고

final void invocationStarted(IInvocationContext context)

테스트 호출의 시작을 보고합니다.

final void logAssociation(String dataName, LogFile logFile)

어떤 경우에는 로그가 테스트 사례와 밀접하게 연관되어 있어야 하지만, 직접 testLogSaved(String, com.android.tradefed.result.LogDataType, com.android.tradefed.result.InputStreamSource, com.android.tradefed.result.LogFile) 콜백을 사용할 수 없습니다.

void processFinalInvocationLogs(TestRecordProto.TestRecord invocationLogs)

호출 레코드를 사용하여 호출의 모든 최종 로그를 하나씩 전송합니다.

void processFinalProto(TestRecordProto.TestRecord finalRecord)

모든 결과가 포함된 최종 proto 처리

void processStartInvocation(TestRecordProto.TestRecord invocationStartRecord, IInvocationContext invocationContext)

invocationStarted(com.android.tradefed.invoker.IInvocationContext) 발생 후 부분 호출 테스트 레코드 proto 처리

void processTestCaseEnded(TestRecordProto.TestRecord testCaseRecord)

ERROR(/#testEnded(com.android.tradefed.result.TestDescription,long,HashMap)) 발생 후 최종 테스트 사례 레코드 프로토콜 처리

void processTestCaseStarted(TestRecordProto.TestRecord testCaseStartedRecord)

testStarted(com.android.tradefed.result.TestDescription, long) 발생 후 부분 테스트 사례 기록 proto 처리

void processTestModuleEnd(TestRecordProto.TestRecord moduleRecord)

testModuleEnded() 발생 후 최종 모듈 레코드 proto 처리

void processTestModuleStarted(TestRecordProto.TestRecord moduleStartRecord)

testModuleStarted(com.android.tradefed.invoker.IInvocationContext) 발생 후 부분 모듈 레코드 proto 처리

void processTestRunEnded(TestRecordProto.TestRecord runRecord, boolean moduleInProgress)

ERROR(/#testRunEnded(long,HashMap)) 후 최종 실행 레코드 proto 처리 수 있습니다.

void processTestRunStarted(TestRecordProto.TestRecord runStartedRecord)

testRunStarted(String, int) 이후의 부분 테스트 실행 레코드 proto 처리 수 있습니다.

void setGranularResults(boolean granularResults)
void setInlineRecordOfChildren(boolean inline)
boolean supportGranularResults()

보고자가 상세 결과를 지원하는 경우 true를 반환하고 그렇지 않은 경우 false를 반환합니다.

final void testAssumptionFailure(TestDescription test, String trace)

원자적 테스트에서 조건이 false라고 가정할 때 호출됩니다.

final void testAssumptionFailure(TestDescription test, FailureDescription failure)

원자 테스트에서 조건이 false라고 가정할 때 호출됩니다.

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

종료 시간을 지정할 수 있는 ERROR(/#testEnded(com.android.tradefed.result.TestDescription,Map))의 대안 바로 그것입니다.

void testEnded(TestDescription test, testMetrics)

개별 테스트 사례의 실행 종료를 보고합니다.

final void testFailed(TestDescription test, FailureDescription failure)

개별 테스트 사례의 실패를 보고합니다.

final void testFailed(TestDescription test, String trace)

개별 테스트 사례의 실패를 보고합니다.

final void testIgnored(TestDescription test)

테스트가 실행되지 않을 때 호출됩니다. 일반적으로 테스트 메서드가 다음과 같이 주석 처리되어 있기 때문입니다. org.junit.Ignore를 사용하세요.

final void testModuleEnded()

모듈 실행 종료를 보고합니다.

final void testModuleStarted(IInvocationContext moduleContext)

실행 중인 모듈의 시작을 보고합니다.

final void testRunEnded(long elapsedTimeMillis, runMetrics)

테스트 실행 종료를 보고합니다.

final void testRunFailed(FailureDescription failure)

FailureDescription에 설명된 실패로 인해 보고서 테스트 실행을 완료하지 못했습니다.

final void testRunFailed(String errorMessage)

치명적인 오류로 인해 테스트 실행을 완료하지 못했습니다.

void testRunStarted(String runName, int testCount, int attemptNumber)

테스트 실행 시작을 보고합니다.

final void testRunStarted(String runName, int testCount)

테스트 실행 시작을 보고합니다.

void testRunStarted(String runName, int testCount, int attemptNumber, long startTime)

테스트 실행 시작을 보고합니다.

final void testSkipped(TestDescription test, SkipReason reason)

테스트를 건너뛰고 일반적으로 예상치 못한 이유로 실행되지 않은 경우 호출됩니다.

final void testStarted(TestDescription test, long startTime)

테스트가 언제 실행되었는지도 지정하는 testStarted(com.android.tradefed.result.TestDescription)의 대안 시작되었으며 정확한 측정을 위해 ERROR(/#testEnded(com.android.tradefed.result.TestDescription,long,Map))와 결합되었습니다.

final void testStarted(TestDescription test)

개별 테스트 사례의 시작을 보고합니다.

보호된 메서드

TestRecordProto.ChildReference createModuleChildReference(TestRecordProto.TestRecord record)

모듈의 하위 참조를 만듭니다.

공개 생성자

ProtoResultReporter

public ProtoResultReporter ()

공개 메서드

invocationEnded

public final void invocationEnded (long elapsedTime)

성공적으로 또는 일부 오류로 인해 호출이 종료되었음을 보고합니다. 있습니다.

TradeFederation 프레임워크에서 자동으로 호출됩니다.

매개변수
elapsedTime long: 호출 경과 시간(밀리초)

invocationFailed

public void invocationFailed (FailureDescription failure)

일부 오류 상태로 인해 불완전한 호출을 보고합니다.

TradeFederation 프레임워크에서 자동으로 호출됩니다.

매개변수
failure FailureDescription: 실패 원인을 설명하는 FailureDescription

invocationFailed

public void invocationFailed (Throwable cause)

일부 오류 상태로 인해 불완전한 호출을 보고합니다.

TradeFederation 프레임워크에서 자동으로 호출됩니다.

매개변수
cause Throwable: 실패의 Throwable 원인

호출을 건너뜀

public void invocationSkipped (SkipReason reason)

호출을 건너뛴 것으로 보고

매개변수
reason SkipReason

invocationStarted

public final void invocationStarted (IInvocationContext context)

테스트 호출의 시작을 보고합니다.

TradeFederation 프레임워크에서 자동으로 호출됩니다. 신고자가 이를 재정의해야 함 이 메서드를 사용하여 여러 기기 보고를 지원할 수 있습니다.

매개변수
context IInvocationContext: 호출에 관한 정보입니다.

logAssociation

public final void logAssociation (String dataName, 
                LogFile logFile)

어떤 경우에는 로그가 테스트 사례와 밀접하게 연관되어 있어야 하지만, 직접 testLogSaved(String, com.android.tradefed.result.LogDataType, com.android.tradefed.result.InputStreamSource, com.android.tradefed.result.LogFile) 콜백을 사용할 수 없습니다. 따라서 이 콜백을 사용하면 명시적으로 초기화합니다.

매개변수
dataName String: 데이터 이름

logFile LogFile: 이전에 로깅되었으며 다음과 연결되어야 하는 LogFile입니다. 테스트 사례입니다.

processFinalInvocationLogs

public void processFinalInvocationLogs (TestRecordProto.TestRecord invocationLogs)

호출 레코드를 사용하여 호출의 모든 최종 로그를 하나씩 전송합니다.

매개변수
invocationLogs TestRecordProto.TestRecord: 호출을 나타내는 최종 proto입니다.

프로세스FinalProto

public void processFinalProto (TestRecordProto.TestRecord finalRecord)

모든 결과가 포함된 최종 proto 처리

매개변수
finalRecord TestRecordProto.TestRecord: 모든 호출 결과가 포함된 최종 proto입니다.

프로세스 시작 호출

public void processStartInvocation (TestRecordProto.TestRecord invocationStartRecord, 
                IInvocationContext invocationContext)

invocationStarted(com.android.tradefed.invoker.IInvocationContext) 발생 후 부분 호출 테스트 레코드 proto 처리

매개변수
invocationStartRecord TestRecordProto.TestRecord: invocationStart 이후에 채워진 부분 proto입니다.

invocationContext IInvocationContext: IInvocationContext를 호출합니다.

processTestCaseEnded

public void processTestCaseEnded (TestRecordProto.TestRecord testCaseRecord)

ERROR(/#testEnded(com.android.tradefed.result.TestDescription,long,HashMap)) 발생 후 최종 테스트 사례 레코드 프로토콜 처리

매개변수
testCaseRecord TestRecordProto.TestRecord: 테스트 사례를 나타내는 최종 proto입니다.

processTestCaseStarted

public void processTestCaseStarted (TestRecordProto.TestRecord testCaseStartedRecord)

testStarted(com.android.tradefed.result.TestDescription, long) 발생 후 부분 테스트 사례 기록 proto 처리

매개변수
testCaseStartedRecord TestRecordProto.TestRecord: 테스트 사례를 나타내는 부분 proto입니다.

프로세스 테스트 모듈 종료

public void processTestModuleEnd (TestRecordProto.TestRecord moduleRecord)

testModuleEnded() 발생 후 최종 모듈 레코드 proto 처리

매개변수
moduleRecord TestRecordProto.TestRecord: 모듈을 나타내는 최종 proto입니다.

프로세스 테스트 모듈 시작됨

public void processTestModuleStarted (TestRecordProto.TestRecord moduleStartRecord)

testModuleStarted(com.android.tradefed.invoker.IInvocationContext) 발생 후 부분 모듈 레코드 proto 처리

매개변수
moduleStartRecord TestRecordProto.TestRecord: 모듈을 나타내는 부분 proto입니다.

processTestRunEnded

public void processTestRunEnded (TestRecordProto.TestRecord runRecord, 
                boolean moduleInProgress)

ERROR(/#testRunEnded(long,HashMap)) 후의 최종 실행 레코드 proto 처리 수 있습니다.

매개변수
runRecord TestRecordProto.TestRecord: 실행을 나타내는 최종 proto입니다.

moduleInProgress boolean: 모듈이 진행 중인지 여부입니다.

프로세스 테스트 실행 시작

public void processTestRunStarted (TestRecordProto.TestRecord runStartedRecord)

testRunStarted(String, int) 이후의 부분 테스트 실행 레코드 proto 처리 수 있습니다.

매개변수
runStartedRecord TestRecordProto.TestRecord: 실행을 나타내는 부분 proto입니다.

setGranularResults

public void setGranularResults (boolean granularResults)

매개변수
granularResults boolean

하위 요소의 인라인 레코드 설정

public void setInlineRecordOfChildren (boolean inline)

매개변수
inline boolean

supportGranularResults

public boolean supportGranularResults ()

보고자가 상세 결과를 지원하는 경우 true를 반환하고 그렇지 않은 경우 false를 반환합니다.

반환 값
boolean

testAssumptionFailure

public final void testAssumptionFailure (TestDescription test, 
                String trace)

원자 테스트에서 조건이 false라고 가정할 때 호출됩니다.

매개변수
test TestDescription: 테스트를 식별합니다.

trace String: 실패의 스택 트레이스

testAssumptionFailure

public final void testAssumptionFailure (TestDescription test, 
                FailureDescription failure)

원자 테스트에서 조건이 false라고 가정할 때 호출됩니다.

매개변수
test TestDescription: 테스트를 식별합니다.

failure FailureDescription: 실패 및 컨텍스트를 설명하는 FailureDescription입니다.

testEnded

public final 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)

testEnded

public void testEnded (TestDescription test, 
                 testMetrics)

개별 테스트 사례의 실행 종료를 보고합니다.

testFailed(TestDescription, FailureDescription)가 호출되지 않았다면 이 테스트는 통과한 것입니다. 또한 모든 키/값 반환 측정항목입니다.

매개변수
test TestDescription: 테스트를 식별합니다.

testMetrics : 내보낸 측정항목의 ERROR(/Map)

테스트 실패

public final void testFailed (TestDescription test, 
                FailureDescription failure)

개별 테스트 사례의 실패를 보고합니다.

testStarted와 testEnded 사이에 호출됩니다.

매개변수
test TestDescription: 테스트를 식별합니다.

failure FailureDescription: 실패 및 컨텍스트를 설명하는 FailureDescription입니다.

테스트 실패

public final void testFailed (TestDescription test, 
                String trace)

개별 테스트 사례의 실패를 보고합니다.

testStarted와 testEnded 사이에 호출됩니다.

매개변수
test TestDescription: 테스트를 식별합니다.

trace String: 실패의 스택 트레이스

testIgnored

public final void testIgnored (TestDescription test)

테스트가 실행되지 않을 때 호출됩니다. 일반적으로 테스트 메서드가 다음과 같이 주석 처리되어 있기 때문입니다. org.junit.Ignore를 사용하세요.

매개변수
test TestDescription: 테스트를 식별합니다.

testModuleEnded

public final void testModuleEnded ()

모듈 실행 종료를 보고합니다.

testModuleStarted

public final void testModuleStarted (IInvocationContext moduleContext)

실행 중인 모듈의 시작을 보고합니다. 이 콜백은 testModuleEnded()와 연결되며 시퀀스에서 선택사항입니다. 다음을 사용하는 실행 중에만 사용됩니다. 모듈: 도구 모음 기반 실행기입니다.

매개변수
moduleContext IInvocationContext: 모듈의 IInvocationContext입니다.

testRunEnded

public final void testRunEnded (long elapsedTimeMillis, 
                 runMetrics)

테스트 실행 종료를 보고합니다. 수정: 두 개의 지도를 가질 수 없습니다<> 다른 유형의 인터페이스를 제공하기 때문에 여기서는 HashMap을 사용해야 합니다.

매개변수
elapsedTimeMillis long: 기기에서 보고된 경과 시간(밀리초)입니다.

runMetrics : Metric로 테스트 실행이 끝날 때 보고된 키-값 쌍입니다.

testRunFailed

public final void testRunFailed (FailureDescription failure)

FailureDescription에 설명된 실패로 인해 보고서 테스트 실행을 완료하지 못했습니다.

매개변수
failure FailureDescription: 실패 및 컨텍스트를 설명하는 FailureDescription입니다.

testRunFailed

public final void testRunFailed (String errorMessage)

치명적인 오류로 인해 테스트 실행을 완료하지 못했습니다.

매개변수
errorMessage String: String는 실행 실패 이유를 설명합니다.

testRunStarted

public void testRunStarted (String runName, 
                int testCount, 
                int attemptNumber)

테스트 실행 시작을 보고합니다.

매개변수
runName String: 테스트 실행 이름입니다.

testCount int: 테스트 실행의 총 테스트 수

attemptNumber int: 주문 번호, 동일한 runName의 여러 시도를 식별합니다. 여러 번 실행되는 것을 볼 수 있습니다 TryNumber는 0으로 색인이 생성되며 매번 증가해야 합니다. 새 실행이 발생합니다 예: 테스트는 3회 세분화되어 재시도되며 총 4회가 필요합니다. 동일한 runName에서 실행되며 시도Number는 0에서 3 사이입니다.

testRunStarted

public final void testRunStarted (String runName, 
                int testCount)

테스트 실행 시작을 보고합니다.

매개변수
runName String: 테스트 실행 이름입니다.

testCount int: 테스트 실행의 총 테스트 수

testRunStarted

public void testRunStarted (String runName, 
                int testCount, 
                int attemptNumber, 
                long startTime)

테스트 실행 시작을 보고합니다.

매개변수
runName String: 테스트 실행 이름입니다.

testCount int: 테스트 실행의 총 테스트 수

attemptNumber int: 주문 번호, 동일한 runName의 여러 시도를 식별합니다. 여러 번 실행되는 것을 볼 수 있습니다 tryNumber는 0으로 시작되며 새로운 실행이 발생합니다 예: 테스트는 3회 세분화되며 총 4회 실행됩니다. 0에서 3까지 동일한 runName으로 시도됩니다.

startTime long: 실행이 시작된 시간으로, System.currentTimeMillis()를 통해 측정됩니다.

testSkipped

public final void testSkipped (TestDescription test, 
                SkipReason reason)

테스트를 건너뛰고 일반적으로 예상치 못한 이유로 실행되지 않은 경우 호출됩니다. 이러한 테스트는 제대로 실행하기 위해 재시도됩니다.

매개변수
test TestDescription: 테스트를 식별합니다.

reason SkipReason: SkipReason

testStarted

public final void testStarted (TestDescription test, 
                long startTime)

테스트가 언제 실행되었는지도 지정하는 testStarted(com.android.tradefed.result.TestDescription)의 대안 시작되었으며 정확한 측정을 위해 ERROR(/#testEnded(com.android.tradefed.result.TestDescription,long,Map))와 결합되었습니다.

매개변수
test TestDescription: 테스트를 식별합니다.

startTime long: 테스트가 시작된 시간으로, System.currentTimeMillis()를 통해 측정됩니다.

testStarted

public final void testStarted (TestDescription test)

개별 테스트 사례의 시작을 보고합니다. 이전 인터페이스이므로 가능하면 testStarted(com.android.tradefed.result.TestDescription)를 사용해야 합니다.

매개변수
test TestDescription: 테스트를 식별합니다.

보호된 메서드

createModuleChildReference

protected TestRecordProto.ChildReference createModuleChildReference (TestRecordProto.TestRecord record)

모듈의 하위 참조를 만듭니다.

매개변수
record TestRecordProto.TestRecord

반환 값
TestRecordProto.ChildReference