결과 집계자

public class ResultAggregator
extends CollectingTestListener

java.lang.Object의 클래스
   ↳ com.android.tradefed.result.CollectingTestListener
     ↳ com.android.tradefed.retry.ResultAggregator


필요한 경우 재시도 전략을 기반으로 결과를 집계하는 특별 포워더입니다. 있습니다.

요약

공개 생성자

ResultAggregator( listeners, RetryStrategy strategy)

공개 메서드

void cleanEventsFiles()
final void forwardAggregatedInvocationLogs()

모든 호출 수준 로그를 세분화된 있습니다.

void invocationEnded(long elapsedTime)

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

void invocationFailed(FailureDescription failure)

void invocationFailed(Throwable cause)

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

void invocationSkipped(SkipReason reason)

호출을 건너뛴 것으로 보고

void invocationStarted(IInvocationContext context)

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

void logAssociation(String dataName, LogFile logFile)

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

void setLogSaver(ILogSaver logSaver)

void setUpdatedReporting(boolean updatedReporting)

새 보고를 설정합니다.

void testAssumptionFailure(TestDescription test, String trace)

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

void testAssumptionFailure(TestDescription test, FailureDescription failure)

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

void testEnded(TestDescription test, long endTime, testMetrics)

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

void testFailed(TestDescription test, FailureDescription failure)

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

void testFailed(TestDescription test, String trace)

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

void testIgnored(TestDescription test)

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

void testLog(String dataName, LogDataType dataType, InputStreamSource dataStream)

void testLogSaved(String dataName, LogDataType dataType, InputStreamSource dataStream, LogFile logFile)
void testModuleEnded()

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

void testModuleStarted(IInvocationContext moduleContext)

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

void testRunEnded(long elapsedTime, runMetrics)

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

void testRunFailed(FailureDescription failure)

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

void testRunFailed(String errorMessage)

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

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

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

void testSkipped(TestDescription test, SkipReason reason)

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

void testStarted(TestDescription test, long startTime)

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

보호된 메서드

File[] getEventsLogs()

공개 생성자

결과 집계자

public ResultAggregator ( listeners, 
                RetryStrategy strategy)

매개변수
listeners

strategy RetryStrategy

공개 메서드

정리 이벤트 파일

public void cleanEventsFiles ()

순방향 집계 호출 로그

public final void forwardAggregatedInvocationLogs ()

모든 호출 수준 로그를 세분화된 있습니다.

invocationEnded

public void invocationEnded (long elapsedTime)

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

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

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

invocationFailed

public void invocationFailed (FailureDescription failure)

매개변수
failure FailureDescription

invocationFailed

public void invocationFailed (Throwable cause)

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

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

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

호출을 건너뜀

public void invocationSkipped (SkipReason reason)

호출을 건너뛴 것으로 보고

매개변수
reason SkipReason

invocationStarted

public void invocationStarted (IInvocationContext context)

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

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

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

logAssociation

public 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입니다. 테스트 사례입니다.

setLogSaver

public void setLogSaver (ILogSaver logSaver)

매개변수
logSaver ILogSaver

setUpdatedReporting

public void setUpdatedReporting (boolean updatedReporting)

새 보고를 설정합니다.

매개변수
updatedReporting boolean

testAssumptionFailure

public void testAssumptionFailure (TestDescription test, 
                String trace)

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

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

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

testAssumptionFailure

public void testAssumptionFailure (TestDescription test, 
                FailureDescription failure)

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

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

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

testEnded

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: 실패의 스택 트레이스

testIgnored

public void testIgnored (TestDescription test)

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

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

testLog

public void testLog (String dataName, 
                LogDataType dataType, 
                InputStreamSource dataStream)

매개변수
dataName String

dataType LogDataType

dataStream InputStreamSource

testLogSaved

public void testLogSaved (String dataName, 
                LogDataType dataType, 
                InputStreamSource dataStream, 
                LogFile logFile)

매개변수
dataName String

dataType LogDataType

dataStream InputStreamSource

logFile LogFile

testModuleEnded

public void testModuleEnded ()

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

testModuleStarted

public void testModuleStarted (IInvocationContext moduleContext)

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

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

testRunEnded

public void testRunEnded (long elapsedTime, 
                 runMetrics)

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

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

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

testRunFailed

public void testRunFailed (FailureDescription failure)

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

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

testRunFailed

public void testRunFailed (String errorMessage)

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

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

testRunStarted

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

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

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

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

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

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

testSkipped

public void testSkipped (TestDescription test, 
                SkipReason reason)

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

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

reason SkipReason: SkipReason

testStarted

public 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()를 통해 측정됩니다.

보호된 메서드

getEventsLogs

protected File[] getEventsLogs ()

반환 값
File[]