ModuleResultsAndMetricsForwarder
public
class
ModuleResultsAndMetricsForwarder
extends ResultAndLogForwarder
java.lang.Object | |||
↳ | com.android.tradefed.result.ResultForwarder | ||
↳ | com.android.tradefed.result.ResultAndLogForwarder | ||
↳ | com.android.tradefed.result.ModuleResultsAndMetricsForwarder |
테스트 결과에 모듈 관련 측정항목을 추가하는 ResultAndLogForwarder
의 확장 프로그램입니다.
요약
공개 생성자 | |
---|---|
ModuleResultsAndMetricsForwarder(ITestInvocationListener... listeners)
|
공개 메서드 | |
---|---|
void
|
setAttemptIsolation(CurrentInvocation.IsolationGrade isolation)
시도를 고립된 것으로 보고할지 여부를 설정합니다. |
void
|
setModuleId(String moduleId)
|
void
|
setTestMappingSources(
측정항목에 삽입할 테스트 매핑 소스를 설정합니다. |
void
|
testEnded(TestDescription test, long endTime,
종료 시간을 직접 지정할 수 있는 |
void
|
testEnded(TestDescription test,
개별 테스트 사례의 실행 종료를 보고합니다. |
void
|
testFailed(TestDescription test, FailureDescription failure)
개별 테스트 사례의 실패를 보고합니다. |
void
|
testFailed(TestDescription test, String trace)
개별 테스트 사례의 실패를 보고합니다. |
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
|
testStarted(TestDescription test, long startTime)
테스트가 시작된 시점도 지정하는 |
void
|
testStarted(TestDescription test)
개별 테스트 사례의 시작을 보고합니다. |
공개 생성자
ModuleResultsAndMetricsForwarder
public ModuleResultsAndMetricsForwarder (ITestInvocationListener... listeners)
매개변수 | |
---|---|
listeners |
ITestInvocationListener |
공개 메서드
setAttemptIsolation
public void setAttemptIsolation (CurrentInvocation.IsolationGrade isolation)
시도를 고립된 것으로 보고할지 여부를 설정합니다.
매개변수 | |
---|---|
isolation |
CurrentInvocation.IsolationGrade |
setModuleId
public void setModuleId (String moduleId)
매개변수 | |
---|---|
moduleId |
String |
setTestMappingSources
public void setTestMappingSources (testMappingSources)
측정항목에 삽입할 테스트 매핑 소스를 설정합니다.
매개변수 | |
---|---|
testMappingSources |
|
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,testMetrics)
개별 테스트 사례의 실행 종료를 보고합니다.
testFailed(TestDescription, FailureDescription)
이 호출되지 않았다면 이 테스트는 통과한 것입니다. 또한 테스트 사례 실행 중에 내보냈을 수 있는 모든 키-값 측정항목도 반환합니다.
매개변수 | |
---|---|
test |
TestDescription : 테스트를 식별합니다. |
testMetrics |
: 내보낸 측정항목의 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 : 실패의 스택 트레이스 |
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으로 시작하며 새 실행이 발생할 때마다 증가해야 합니다. 예를 들어 테스트가 세부적으로 세 번 재시도되면 동일한 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으로 시작하며 새 실행이 발생할 때마다 증가해야 합니다. 예를 들어 테스트가 세부적으로 세 번 재시도되면 동일한 runName 아래에 총 4개의 실행이 있어야 하며 attemptNumber는 0~3입니다. |
startTime |
long : System.currentTimeMillis() 를 통해 측정된 실행 시작 시간 |
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 : 테스트를 식별합니다. |