TestTimeoutEnforcer
public
final
class
TestTimeoutEnforcer
extends ResultForwarder
java.lang.Object | ||
↳ | com.android.tradefed.result.ResultForwarder | |
↳ | com.android.tradefed.testtype.TestTimeoutEnforcer |
특정 테스트 사례의 실행 시간을 확인하고 지정된 제한 시간을 초과하면 실패하도록 허용하는 리스너입니다.
이 시정 조치 도구는 테스트를 중단하지는 않지만 테스트를 실패하게 합니다.
요약
필드 | |
---|---|
public
static
final
String |
TEST_CASE_TIMEOUT_DESCRIPTION
|
public
static
final
String |
TEST_CASE_TIMEOUT_OPTION
|
공개 생성자 | |
---|---|
TestTimeoutEnforcer(long perTestCaseTimeout, TimeUnit unit, ITestInvocationListener... listeners)
적용할 지정된 시간 제한으로 |
|
TestTimeoutEnforcer(long perTestCaseTimeout, TimeUnit unit,
적용할 지정된 시간 제한으로 |
공개 메서드 | |
---|---|
void
|
testAssumptionFailure(TestDescription test, FailureDescription failure)
원자 테스트에서 거짓인 조건을 가정한다고 플래그를 지정할 때 호출됩니다. |
void
|
testAssumptionFailure(TestDescription test, String trace)
원자 테스트에서 거짓인 조건을 가정한다고 플래그를 지정할 때 호출됩니다. |
void
|
testEnded(TestDescription test, long endTime,
종료 시간을 직접 지정할 수 있는 |
void
|
testFailed(TestDescription test, FailureDescription failure)
개별 테스트 사례의 실패를 보고합니다. |
void
|
testFailed(TestDescription test, String trace)
개별 테스트 사례의 실패를 보고합니다. |
void
|
testIgnored(TestDescription test)
테스트가 실행되지 않을 때 호출됩니다(일반적으로 테스트 메서드에 org.junit.Ignore 주석이 달려 있기 때문). |
void
|
testStarted(TestDescription test, long startTime)
테스트가 시작된 시점도 지정하는 |
필드
TEST_CASE_TIMEOUT_DESCRIPTION
public static final String TEST_CASE_TIMEOUT_DESCRIPTION
TEST_CASE_TIMEOUT_OPTION
public static final String TEST_CASE_TIMEOUT_OPTION
공개 생성자
TestTimeoutEnforcer
public TestTimeoutEnforcer (long perTestCaseTimeout, TimeUnit unit, ITestInvocationListener... listeners)
적용할 지정된 시간 제한으로 TestTimeoutEnforcer
를 만듭니다.
매개변수 | |
---|---|
perTestCaseTimeout |
long : 제한 시간 값입니다. |
unit |
TimeUnit : perTestCaseTimeout의 ERROR(/TimeUnit) 입니다. |
listeners |
ITestInvocationListener : 전달할 ITestInvocationListener 입니다. |
TestTimeoutEnforcer
public TestTimeoutEnforcer (long perTestCaseTimeout, TimeUnit unit,listeners)
적용할 지정된 시간 제한으로 TestTimeoutEnforcer
를 만듭니다.
매개변수 | |
---|---|
perTestCaseTimeout |
long : 제한 시간 값입니다. |
unit |
TimeUnit : perTestCaseTimeout의 ERROR(/TimeUnit) 입니다. |
listeners |
: 전달할 ITestInvocationListener 입니다. |
공개 메서드
testAssumptionFailure
public void testAssumptionFailure (TestDescription test, FailureDescription failure)
원자 테스트에서 거짓인 조건을 가정한다고 플래그를 지정할 때 호출됩니다.
매개변수 | |
---|---|
test |
TestDescription : 테스트를 식별합니다. |
failure |
FailureDescription : 오류 및 컨텍스트를 설명하는 FailureDescription 입니다. |
testAssumptionFailure
public void testAssumptionFailure (TestDescription test, String trace)
원자 테스트에서 거짓인 조건을 가정한다고 플래그를 지정할 때 호출됩니다.
매개변수 | |
---|---|
test |
TestDescription : 테스트를 식별합니다. |
trace |
String : 실패의 스택 트레이스 |
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) 입니다. |
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 : 테스트를 식별합니다. |
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() 를 통해 측정된 테스트 시작 시간입니다. |