TestResultListener
public
abstract
class
TestResultListener
extends Object
implements
ITestLifeCycleReceiver
java.lang.Object | |
↳ | com.android.tradefed.result.TestResultListener의 클래스 |
개별 테스트 결과에만 관심이 있는 구현자를 위해 ITestLifecycleListener를 단순화한 것입니다.
다양한 수명 주기 이벤트를 testResult 메서드로 필터링합니다.
스레드 안전하지 않으며 특히 ITestLifecycleListener 이벤트가 순서대로 수신된다고 가정합니다.
요약
공개 생성자 | |
---|---|
TestResultListener()
|
공개 메서드 | |
---|---|
final
void
|
testAssumptionFailure(TestDescription test, String trace)
원자 테스트에서 거짓인 조건을 가정한다고 플래그를 지정할 때 호출됩니다. |
final
void
|
testEnded(TestDescription test,
개별 테스트 사례의 실행 종료를 보고합니다. |
final
void
|
testEnded(TestDescription test, long endTime,
종료 시간을 직접 지정할 수 있는 |
final
void
|
testFailed(TestDescription test, String trace)
개별 테스트 사례의 실패를 보고합니다. |
final
void
|
testIgnored(TestDescription test)
테스트가 실행되지 않을 때 호출됩니다(일반적으로 테스트 메서드에 org.junit.Ignore 주석이 추가되어 있기 때문). |
abstract
void
|
testResult(TestDescription test, TestResult result)
|
void
|
testRunEnded(long elapsedTimeMillis,
테스트 실행 종료를 보고합니다. |
void
|
testSkipped(TestDescription test, SkipReason reason)
테스트가 건너뛰어졌으며 일반적으로 예상되지 않는 이유로 실행되지 않았을 때 호출됩니다. |
final
void
|
testStarted(TestDescription test, long startTime)
테스트가 시작된 시점도 지정하는 |
final
void
|
testStarted(TestDescription test)
개별 테스트 사례의 시작을 보고합니다. |
공개 생성자
TestResultListener
public TestResultListener ()
공개 메서드
testAssumptionFailure
public final void testAssumptionFailure (TestDescription test, String trace)
원자 테스트에서 거짓인 조건을 가정한다고 플래그를 지정할 때 호출됩니다.
매개변수 | |
---|---|
test |
TestDescription : 테스트를 식별합니다. |
trace |
String : 실패의 스택 트레이스 |
testEnded
public final void testEnded (TestDescription test,testMetrics)
개별 테스트 사례의 실행 종료를 보고합니다.
testFailed(TestDescription, FailureDescription)
이 호출되지 않았다면 이 테스트는 통과한 것입니다. 또한 테스트 사례 실행 중에 내보냈을 수 있는 모든 키-값 측정항목도 반환합니다.
매개변수 | |
---|---|
test |
TestDescription : 테스트를 식별합니다. |
testMetrics |
: 내보낸 측정항목의 ERROR(/Map) 입니다. |
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) 입니다. |
testFailed
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 : 테스트를 식별합니다. |
testResult
public abstract void testResult (TestDescription test, TestResult result)
매개변수 | |
---|---|
test |
TestDescription |
result |
TestResult |
testRunEnded
public void testRunEnded (long elapsedTimeMillis,runMetrics)
테스트 실행 종료를 보고합니다.
매개변수 | |
---|---|
elapsedTimeMillis |
long : 기기에서 보고된 경과 시간(밀리초)입니다. |
runMetrics |
: 테스트 실행이 끝날 때 보고되는 키-값 쌍 |
testSkipped
public 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 : 테스트를 식별합니다. |