하위 프로세스결과보고자

public class SubprocessResultsReporter
extends Object implements ITestInvocationListener , ILogSaverListener , ISupportGranularResults

java.lang.Object
com.android.tradefed.result.SubprocessResultsReporter


result_reporter로 지정될 ITestInvocationListener 구현하고 하위 프로세스에서 테스트 결과, 테스트 실행, 테스트 호출을 전달합니다.

요약

공개 생성자

SubprocessResultsReporter ()

공개 메소드

void close ()

TestSummary getSummary ()

InvocationListener가 요약을 반환하도록 허용합니다.

void invocationEnded (long elapsedTime)

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

void invocationFailed ( FailureDescription failure)

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

void invocationFailed (Throwable cause)

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

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) 에서 그렇게 할 수 있는 기회가 있습니다. testLogSaved(String, com.android.tradefed.result.LogDataType, com.android.tradefed.result.InputStreamSource, com.android.tradefed.result.LogFile) 콜백이 불가능합니다.

void printEvent (String key, Object event)

이벤트 키와 json 객체를 인쇄하는 도우미입니다.

void setOutputTestLog (boolean outputTestLog)

기록된 테스트를 출력할지 여부를 설정합니다.

boolean supportGranularResults ()

보고자가 세부적인 결과를 지원하면 True를 반환하고, 그렇지 않으면 False를 반환합니다.

void testAssumptionFailure ( TestDescription testId, String trace)

원자 테스트에서 거짓 조건을 가정한다고 플래그를 지정할 때 호출됩니다.

void testAssumptionFailure ( TestDescription testId, FailureDescription failure)

원자 테스트에서 거짓 조건을 가정한다고 플래그를 지정할 때 호출됩니다.

void testEnded ( TestDescription testId, long endTime, metrics) testEnded ( TestDescription testId, long endTime, metrics)

종료 시간을 직접 지정할 수 ERROR(/#testEnded(com.android.tradefed.result.TestDescription,Map)) 의 대안입니다.

void testEnded ( TestDescription testId, metrics) testEnded ( TestDescription testId, metrics)

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

void testFailed ( TestDescription testId, FailureDescription failure)

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

void testFailed ( TestDescription testId, String reason)

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

void testIgnored ( TestDescription testId)

일반적으로 테스트 메서드에 org.junit.Ignore라는 주석이 달려 있기 때문에 테스트가 실행되지 않을 때 호출됩니다.

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

테스트 호출에서 연관된 로그 또는 디버그 데이터를 제공합니다.

void testModuleEnded ()

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

void testModuleStarted ( IInvocationContext moduleContext)

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

void testRunEnded (long time, runMetrics) testRunEnded (long time, runMetrics)

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

void testRunFailed ( FailureDescription failure)

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

void testRunFailed (String reason)

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

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

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

void testRunStarted (String runName, int testCount)

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

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

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

void testRunStopped (long arg0)

사용자 요청으로 인해 테스트 실행이 완료되기 전에 중지되었음을 보고합니다.

void testSkipped ( TestDescription testId, SkipReason reason)

테스트를 건너뛰고 일반적으로 예상되지 않는 이유로 실행되지 않을 때 호출됩니다.

void testStarted ( TestDescription testId, long startTime)

정확한 측정을 위해 ERROR(/#testEnded(com.android.tradefed.result.TestDescription,long,Map)) 와 결합하여 테스트가 시작된 시기도 지정하는 testStarted(com.android.tradefed.result.TestDescription) 의 대안입니다. .

void testStarted ( TestDescription testId)

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

공개 생성자

하위 프로세스결과보고자

public SubprocessResultsReporter ()

공개 메소드

닫다

public void close ()

getSummary

public TestSummary getSummary ()

InvocationListener가 요약을 반환하도록 허용합니다.

보고
TestSummary 실행을 요약하는 TestSummary 또는 null

호출종료됨

public void invocationEnded (long elapsedTime)

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

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

매개변수
elapsedTime long : 호출 경과 시간(ms)

호출 실패

public void invocationFailed (FailureDescription failure)

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

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

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

호출 실패

public void invocationFailed (Throwable cause)

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

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

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

호출시작됨

public void invocationStarted (IInvocationContext context)

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

TradeFederation 프레임워크에 의해 자동으로 호출됩니다. 보고자는 여러 장치 보고를 지원하기 위해 이 방법을 재정의해야 합니다.

매개변수
context IInvocationContext : 호출에 대한 정보

로그 연관

public void logAssociation (String dataName, 
                LogFile logFile)

어떤 경우에는 로그가 테스트 케이스와 강력하게 연관되어야 하지만 직접 testLogSaved(String, com.android.tradefed.result.LogDataType, com.android.tradefed.result.InputStreamSource, com.android.tradefed.result.LogFile) 에서 그렇게 할 수 있는 기회가 있습니다. testLogSaved(String, com.android.tradefed.result.LogDataType, com.android.tradefed.result.InputStreamSource, com.android.tradefed.result.LogFile) 콜백이 불가능합니다. 따라서 이 콜백을 사용하면 명시적으로 강력한 연관을 제공할 수 있습니다.

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

logFile LogFile : 이전에 기록되었으며 테스트 사례와 연결되어야 하는 LogFile 입니다.

인쇄이벤트

public void printEvent (String key, 
                Object event)

이벤트 키와 json 객체를 인쇄하는 도우미입니다.

매개변수
key String

event Object

setOutputTestLog

public void setOutputTestLog (boolean outputTestLog)

기록된 테스트를 출력할지 여부를 설정합니다.

매개변수
outputTestLog boolean

지원세분화된 결과

public boolean supportGranularResults ()

보고자가 세부적인 결과를 지원하면 True를 반환하고, 그렇지 않으면 False를 반환합니다.

보고
boolean

테스트가정실패

public void testAssumptionFailure (TestDescription testId, 
                String trace)

원자 테스트에서 거짓 조건을 가정한다고 플래그를 지정할 때 호출됩니다.

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

trace String : 실패 스택 추적

테스트가정실패

public void testAssumptionFailure (TestDescription testId, 
                FailureDescription failure)

원자 테스트에서 거짓 조건을 가정한다고 플래그를 지정할 때 호출됩니다.

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

failure FailureDescription : 실패와 해당 컨텍스트를 설명하는 FailureDescription .

테스트 종료됨

public void testEnded (TestDescription testId, 
                long endTime, 
                 metrics)

종료 시간을 직접 지정할 수 ERROR(/#testEnded(com.android.tradefed.result.TestDescription,Map)) 의 대안입니다. 정확한 측정을 위해 testStarted(com.android.tradefed.result.TestDescription, long) 와 결합하세요.

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

endTime long : System.currentTimeMillis() 통해 측정된 테스트 종료 시간

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

테스트 종료됨

public void testEnded (TestDescription testId, 
                 metrics)

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

testFailed(TestDescription, FailureDescription) 호출되지 않은 경우 이 테스트는 통과된 것입니다. 또한 테스트 사례 실행 중에 방출되었을 수 있는 모든 키/값 측정항목을 반환합니다.

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

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

테스트 실패

public void testFailed (TestDescription testId, 
                FailureDescription failure)

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

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

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

failure FailureDescription : 실패와 해당 컨텍스트를 설명하는 FailureDescription .

테스트 실패

public void testFailed (TestDescription testId, 
                String reason)

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

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

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

reason String : 실패 스택 추적

테스트는 무시됨

public void testIgnored (TestDescription testId)

일반적으로 테스트 메서드에 org.junit.Ignore라는 주석이 달려 있기 때문에 테스트가 실행되지 않을 때 호출됩니다.

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

테스트로그

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

테스트 호출에서 연관된 로그 또는 디버그 데이터를 제공합니다.

ERROR(/ITestInvocationListener#invocationFailed(Throwable)) 또는 ERROR(/ITestInvocationListener#invocationEnded(long)) 이전에 호출되어야 합니다.

TradeFederation 프레임워크는 자동으로 이 메서드를 호출하여 호스트 로그와 해당하는 경우 장치 logcat을 제공합니다.

매개변수
dataName String : 데이터를 설명하는 String 이름입니다. 예: "device_logcat". 참고 dataName은 호출마다 고유하지 않을 수 있습니다. 즉, 구현자는 동일한 dataName을 사용하여 여러 호출을 처리할 수 있어야 합니다.

dataType LogDataType : 데이터의 LogDataType

dataStream InputStreamSource : 데이터의 InputStreamSource . 구현자는 createInputStream을 호출하여 데이터 읽기를 시작하고 완료되면 결과 InputStream을 닫아야 합니다. 호출자는 testLog 메서드가 완료될 때까지 데이터 소스가 계속 존재하고 액세스 가능한지 확인해야 합니다.

테스트모듈종료됨

public void testModuleEnded ()

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

테스트모듈시작됨

public void testModuleStarted (IInvocationContext moduleContext)

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

매개변수
moduleContext IInvocationContext : 모듈의 IInvocationContext .

테스트실행이 종료됨

public void testRunEnded (long time, 
                 runMetrics)

테스트 실행 종료를 보고합니다. FIXME: 서로 다른 유형의 두 개의 Map<> 인터페이스를 가질 수 없으므로 여기서는 HashMap을 사용해야 합니다.

매개변수
time long : 장치가 보고한 경과 시간(밀리초)

runMetrics : Metric 사용한 테스트 실행이 끝나면 보고된 키-값 쌍입니다.

테스트실행실패

public void testRunFailed (FailureDescription failure)

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

매개변수
failure FailureDescription : 실패와 해당 컨텍스트를 설명하는 FailureDescription .

테스트실행실패

public void testRunFailed (String reason)

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

매개변수
reason String : 실행 실패 이유를 설명하는 String 입니다.

테스트실행시작됨

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

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

매개변수
runName String : 테스트 실행 이름

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

attemptNumber int : 여러 번 실행되는 동일한 runName의 다양한 시도를 식별하는 주문 번호입니다. tryNumber는 0부터 인덱스가 지정되며 새 실행이 발생할 때마다 증가해야 합니다. 예를 들어 테스트는 세 번 세분화되어 재시도됩니다. 동일한 runName에서 총 4번의 실행이 있어야 하며, tryNumber는 0에서 3 사이입니다.

테스트실행시작됨

public void testRunStarted (String runName, 
                int testCount)

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

매개변수
runName String : 테스트 실행 이름

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

테스트실행시작됨

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

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

매개변수
runName String : 테스트 실행 이름

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

attemptNumber int : 여러 번 실행되는 동일한 runName의 다양한 시도를 식별하는 주문 번호입니다. tryNumber는 0부터 인덱스가 지정되며 새 실행이 발생할 때마다 증가해야 합니다. 예를 들어 테스트는 세 번 세분화되어 재시도됩니다. 동일한 runName에서 총 4번의 실행이 있어야 하며, tryNumber는 0에서 3 사이입니다.

startTime long : System.currentTimeMillis() 통해 측정된 실행이 시작된 시간

테스트실행중지됨

public void testRunStopped (long arg0)

사용자 요청으로 인해 테스트 실행이 완료되기 전에 중지되었음을 보고합니다.

TODO: 현재 사용되지 않습니다. 제거를 고려하세요.

매개변수
arg0 long : 장치가 보고한 경과 시간(밀리초)

테스트를 건너뛰었습니다.

public void testSkipped (TestDescription testId, 
                SkipReason reason)

테스트를 건너뛰고 일반적으로 예상되지 않는 이유로 실행되지 않을 때 호출됩니다. 이러한 테스트는 적절한 실행을 위해 재시도됩니다.

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

reason SkipReason : SkipReason

테스트시작됨

public void testStarted (TestDescription testId, 
                long startTime)

정확한 측정을 위해 ERROR(/#testEnded(com.android.tradefed.result.TestDescription,long,Map)) 와 결합하여 테스트가 시작된 시기도 지정하는 testStarted(com.android.tradefed.result.TestDescription) 의 대안입니다. .

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

startTime long : System.currentTimeMillis() 통해 측정된 테스트가 시작된 시간입니다.

테스트시작됨

public void testStarted (TestDescription testId)

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

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