ResultReporter
public
class
ResultReporter
extends Object
implements
IConfigurationReceiver,
ILogSaverListener,
ISupportGranularResults,
ITestSummaryListener
| java.lang.Object | |
| ↳ | com.google.android.tradefed.result.teststorage.ResultReporter |
요약
중첩된 클래스 | |
|---|---|
class |
ResultReporter.ListBuilder<T>
|
상수 | |
|---|---|
String |
DEFAULT_BUILDPROVIDER
|
String |
EXPERIMENTAL
|
String |
SYSTEM_CHECKER
|
String |
TRADEFED
|
공개 생성자 | |
|---|---|
ResultReporter()
|
|
공개 메서드 | |
|---|---|
void
|
enableFilterProperty(boolean enableFilterProperty)
|
IConfiguration
|
getConfiguration()
|
TestSummary
|
getSummary()
InvocationListener가 요약을 반환하도록 허용합니다. |
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 log)
경우에 따라 로그가 테스트 사례와 강력하게 연결되어야 하지만 직접 |
void
|
putEarlySummary(
구성의 일부로 인스턴스화된 |
void
|
setConfiguration(IConfiguration configuration)
사용 중인 |
void
|
setLogSaver(ILogSaver logSaver)
구현자가 파일을 저장할 수 있도록 |
boolean
|
supportGranularResults()
리포터가 세부 결과를 지원하는 경우 True를 반환하고, 그렇지 않으면 False를 반환합니다. |
void
|
testAssumptionFailure(TestDescription test, String trace)
원자 테스트에서 거짓인 조건을 가정한다고 표시할 때 호출됩니다. |
void
|
testAssumptionFailure(TestDescription test, FailureDescription failure)
원자 테스트에서 거짓인 조건을 가정한다고 표시할 때 호출됩니다. |
void
|
testEnded(TestDescription test, long endTime,
종료 시간을 직접 지정할 수 있는 |
void
|
testEnded(TestDescription test,
개별 테스트 사례의 실행 종료를 보고합니다. |
void
|
testFailed(TestDescription test, FailureDescription failure)
개별 테스트 사례의 실패를 보고합니다. |
void
|
testFailed(TestDescription test, String trace)
개별 테스트 사례의 실패를 보고합니다. |
void
|
testIgnored(TestDescription test)
테스트가 실행되지 않을 때 호출됩니다. 일반적으로 테스트 메서드에 org.junit.Ignore가 주석으로 달려 있기 때문입니다. |
void
|
testModuleEnded()
모듈 실행의 끝을 보고합니다. |
void
|
testModuleStarted(IInvocationContext moduleContext)
실행 중인 모듈의 시작을 보고합니다. |
void
|
testRunEnded(long elapsedTimeMillis,
테스트 실행의 종료를 보고합니다. |
void
|
testRunFailed(FailureDescription failure)
|
void
|
testRunFailed(String errorMessage)
심각한 오류로 인해 테스트 실행을 완료하지 못했다고 보고합니다. |
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
|
testSkipped(TestDescription test, SkipReason reason)
테스트가 건너뛰고 일반적으로 예상되지 않는 이유로 실행되지 않은 경우 호출됩니다. |
void
|
testStarted(TestDescription test, long startTime)
테스트가 시작된 시간을 지정하는 |
void
|
testStarted(TestDescription test)
개별 테스트 사례의 시작을 보고합니다. |
보호된 메서드 | |
|---|---|
ITestStorageClient
|
createTestStorageClient(IInvocationContext context)
|
String
|
getVersion()
|
상수
DEFAULT_BUILDPROVIDER
public static final String DEFAULT_BUILDPROVIDER
상수 값: 'androidbuild'
실험적 영상
public static final String EXPERIMENTAL
상수 값: 'experimental'
SYSTEM_CHECKER
public static final String SYSTEM_CHECKER
상수 값: 'system_checker'
TRADEFED
public static final String TRADEFED
상수 값: 'tradefed'
공개 생성자
ResultReporter
public ResultReporter ()
공개 메서드
enableFilterProperty
public void enableFilterProperty (boolean enableFilterProperty)
| 매개변수 | |
|---|---|
enableFilterProperty |
boolean |
getSummary
public TestSummary getSummary ()
InvocationListener가 요약을 반환하도록 허용합니다.
| 반환 값 | |
|---|---|
TestSummary |
실행을 요약하는 TestSummary 또는 null |
invocationEnded
public 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 원인 |
invocationSkipped
public void invocationSkipped (SkipReason reason)
호출을 건너뛴 것으로 보고합니다.
| 매개변수 | |
|---|---|
reason |
SkipReason |
invocationStarted
public void invocationStarted (IInvocationContext context)
테스트 호출의 시작을 보고합니다.
TradeFederation 프레임워크에 의해 자동으로 호출됩니다. 리포터는 여러 기기 보고를 지원하기 위해 이 메서드를 재정의해야 합니다.
| 매개변수 | |
|---|---|
context |
IInvocationContext: 호출에 관한 정보 |
logAssociation
public void logAssociation (String dataName,
LogFile log)경우에 따라 로그가 테스트 사례와 강력하게 연결되어야 하지만 직접 testLogSaved(String, com.android.tradefed.result.LogDataType, com.android.tradefed.result.InputStreamSource, com.android.tradefed.result.LogFile) 콜백에서 이렇게 할 수는 없습니다. 따라서 이 콜백을 사용하면 강력한 연결을 명시적으로 제공할 수 있습니다.
| 매개변수 | |
|---|---|
dataName |
String: 데이터의 이름 |
log |
LogFile: 이전에 로깅되었으며 테스트 사례와 연결되어야 하는 LogFile입니다. |
putEarlySummary
public void putEarlySummary (summaries)
구성의 일부로 인스턴스화된 ITestInvocationListener에서 반환되었을 수 있는 null이 아닌 TestSummary의 ERROR(/List)를 전달합니다. 초기 요약은 ITestInvocationListener.invocationStarted(com.android.tradefed.invoker.IInvocationContext) 후에 생성되며 ERROR(/#putSummary(List))를 통해 호출이 끝날 때 완료될 수 있습니다.
이는 ITestInvocationListener.invocationStarted(com.android.tradefed.invoker.IInvocationContext) 전에 호출되며 그 전에 구성된 리스너의 모든 요약을 포함합니다.
| 매개변수 | |
|---|---|
summaries |
: 현재 구성에 포함된 ITestInvocationListener에서 가져온 null이 아닌 TestSummary의 ERROR(/List)입니다. |
setConfiguration
public void setConfiguration (IConfiguration configuration)
사용 중인 IConfiguration를 삽입합니다.
| 매개변수 | |
|---|---|
configuration |
IConfiguration |
setLogSaver
public void setLogSaver (ILogSaver logSaver)
구현자가 파일을 저장할 수 있도록 ILogSaver를 설정합니다.
| 매개변수 | |
|---|---|
logSaver |
ILogSaver: ILogSaver |
supportGranularResults
public boolean supportGranularResults ()
리포터가 세부 결과를 지원하는 경우 True를 반환하고, 그렇지 않으면 False를 반환합니다.
| 반환 값 | |
|---|---|
boolean |
|
testAssumptionFailure
public void testAssumptionFailure (TestDescription test, String trace)
원자 테스트에서 거짓인 조건을 가정한다고 표시할 때 호출됩니다.
| 매개변수 | |
|---|---|
test |
TestDescription: 테스트를 식별합니다. |
trace |
String: 실패의 스택 트레이스 |
testAssumptionFailure
public void testAssumptionFailure (TestDescription test, FailureDescription failure)
원자 테스트에서 거짓인 조건을 가정한다고 표시할 때 호출됩니다.
| 매개변수 | |
|---|---|
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) |
testEnded
public void testEnded (TestDescription test,metrics)
개별 테스트 사례의 실행 종료를 보고합니다.
testFailed(TestDescription, FailureDescription)가 호출되지 않은 경우 이 테스트는 통과됩니다. 테스트 사례 실행 중에 발생했을 수 있는 키/값 측정항목도 반환합니다.
| 매개변수 | |
|---|---|
test |
TestDescription: 테스트를 식별합니다. |
metrics |
: 내보낸 측정항목의 ERROR(/Map) |
testFailed
public void testFailed (TestDescription test, FailureDescription failure)
개별 테스트 사례의 실패를 보고합니다.
testStarted와 testEnded 사이에 호출됩니다.
| 매개변수 | |
|---|---|
test |
TestDescription: 테스트를 식별합니다. |
failure |
FailureDescription: 실패 및 컨텍스트를 설명하는 FailureDescription입니다. |
testFailed
public void testFailed (TestDescription test, String trace)
개별 테스트 사례의 실패를 보고합니다.
testStarted와 testEnded 사이에 호출됩니다.
| 매개변수 | |
|---|---|
test |
TestDescription: 테스트를 식별합니다. |
trace |
String: 실패의 스택 트레이스 |
testIgnored
public void testIgnored (TestDescription test)
테스트가 실행되지 않을 때 호출됩니다. 일반적으로 테스트 메서드에 org.junit.Ignore가 주석으로 달려 있기 때문입니다.
| 매개변수 | |
|---|---|
test |
TestDescription: 테스트를 식별합니다. |
testModuleEnded
public void testModuleEnded ()
모듈 실행의 끝을 보고합니다.
testModuleStarted
public void testModuleStarted (IInvocationContext moduleContext)
실행 중인 모듈의 시작을 보고합니다. 이 콜백은 testModuleEnded()와 연결되어 있으며 시퀀스에서 선택사항입니다. 모듈을 사용하는 실행(스위트 기반 러너) 중에만 사용됩니다.
| 매개변수 | |
|---|---|
moduleContext |
IInvocationContext: 모듈의 IInvocationContext입니다. |
testRunEnded
public void testRunEnded (long elapsedTimeMillis,
runMetrics) 테스트 실행의 종료를 보고합니다.
| 매개변수 | |
|---|---|
elapsedTimeMillis |
long: 기기에서 보고한 경과 시간(밀리초) |
runMetrics |
: 테스트 실행이 끝날 때 보고되는 키-값 쌍 |
testRunFailed
public void testRunFailed (FailureDescription failure)
FailureDescription에 설명된 실패로 인해 테스트 실행이 완료되지 않았다고 보고합니다.
| 매개변수 | |
|---|---|
failure |
FailureDescription: 실패 및 컨텍스트를 설명하는 FailureDescription입니다. |
testRunFailed
public void testRunFailed (String errorMessage)
심각한 오류로 인해 테스트 실행을 완료하지 못했다고 보고합니다.
| 매개변수 | |
|---|---|
errorMessage |
String: 실행 실패 이유를 설명하는 String입니다. |
testRunStarted
public void testRunStarted (String runName,
int testCount,
int attemptNumber)테스트 실행 시작을 보고합니다.
| 매개변수 | |
|---|---|
runName |
String: 테스트 실행 이름 |
testCount |
int: 테스트 실행의 총 테스트 수 |
attemptNumber |
int: 동일한 runName의 여러 시도를 식별하는 주문 번호입니다. attemptNumber는 0부터 시작하며 새 실행이 발생할 때마다 증가해야 합니다. 예를 들어 테스트가 세부적으로 3번 재시도되면 동일한 runName으로 총 4번 실행되며 attemptNumber는 0~3입니다. |
testRunStarted
public 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의 여러 시도를 식별하는 주문 번호입니다. attemptNumber는 0부터 시작하며 새 실행이 발생할 때마다 증가해야 합니다. 예를 들어 테스트가 세부적으로 3번 재시도되면 동일한 runName 아래에 총 4번의 실행이 있어야 하며 attemptNumber는 0~3입니다. |
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()을 통해 측정됨). |
testStarted
public void testStarted (TestDescription test)
개별 테스트 사례의 시작을 보고합니다. 이전 인터페이스로, 가능하면 testStarted(com.android.tradefed.result.TestDescription)을 사용해야 합니다.
| 매개변수 | |
|---|---|
test |
TestDescription: 테스트를 식별합니다. |
보호된 메서드
createTestStorageClient
protected ITestStorageClient createTestStorageClient (IInvocationContext context)
| 매개변수 | |
|---|---|
context |
IInvocationContext |
| 반환 값 | |
|---|---|
ITestStorageClient |
|
getVersion
protected String getVersion ()
| 반환 값 | |
|---|---|
String |
|