BugreportCollector
public
class
BugreportCollector
extends Object
implements
ITestInvocationListener
java.lang.Object | |
↳ | com.android.tradefed.result.BugreportCollector |
구성 가능한 이벤트가 발생할 때 버그 신고를 수집한 후 각 버그 신고가 수집된 후에 하위 요소에서 ITestInvocationListener#testLog
를 호출하는 패스 스루 ITestInvocationListener
입니다.
동작: (FIXME: 완료)
- 테스트 사례가 실패한 경우 각각 캡처
- 각 테스트 사례 후 캡처
- 각 실패한 테스트 사례 후 캡처
- 캡처
요약
중첩된 클래스 | |
---|---|
enum |
BugreportCollector.Filter
|
enum |
BugreportCollector.Freq
|
enum |
BugreportCollector.Noun
|
class |
BugreportCollector.Predicate
버그 신고를 캡처할 시기를 설명하는 전체 조건자입니다. |
enum |
BugreportCollector.Relation
|
interface |
BugreportCollector.SubPredicate
|
필드 | |
---|---|
public
static
final
BugreportCollector.Predicate |
AFTER_FAILED_TESTCASES
각 실패한 테스트 사례 후에 실행되는 사전 정의된 조건자 |
public
static
final
BugreportCollector.Predicate |
AT_START
첫 번째 호출이 시작될 때 실행되는 사전 정의된 조건자 |
공개 생성자 | |
---|---|
BugreportCollector(ITestInvocationListener listener, ITestDevice testDevice)
|
공개 메서드 | |
---|---|
void
|
addPredicate(BugreportCollector.Predicate p)
|
void
|
blockUntilIdle()
수집기가 버그 신고를 수집하지 않을 때까지 차단합니다. |
TestSummary
|
getSummary()
|
void
|
invocationEnded(long elapsedTime)
|
void
|
invocationFailed(Throwable cause)
|
void
|
invocationStarted(IInvocationContext context)
|
void
|
setAsynchronous(boolean asynchronous)
버그 신고 수집이 다른 스레드에서 버그 신고를 수집해야 하는지( |
void
|
setDescriptiveName(String name)
버그 신고를 기록할 때 사용할 설명이 포함된 이름을 설정합니다. |
void
|
setDeviceWaitTime(int waitTime)
버그 신고를 캡처하기 전에 기기가 온라인 상태가 될 때까지 기다릴 시간 (초)을 설정합니다. |
void
|
testAssumptionFailure(TestDescription test, String trace)
|
void
|
testEnded(TestDescription test,
|
void
|
testFailed(TestDescription test, String trace)
|
void
|
testIgnored(TestDescription test)
|
void
|
testLog(String dataName, LogDataType dataType, InputStreamSource dataStream)
|
void
|
testRunEnded(long elapsedTime,
|
void
|
testRunFailed(String errorMessage)
|
void
|
testRunStarted(String runName, int testCount)
|
void
|
testRunStopped(long elapsedTime)
|
void
|
testStarted(TestDescription test)
|
필드
AFTER_FAILED_TESTCASES
public static final BugreportCollector.Predicate AFTER_FAILED_TESTCASES
각 실패한 테스트 사례 후에 실행되는 사전 정의된 조건자
공개 생성자
BugreportCollector
public BugreportCollector (ITestInvocationListener listener, ITestDevice testDevice)
매개변수 | |
---|---|
listener |
ITestInvocationListener |
testDevice |
ITestDevice |
공개 메서드
addPredicate
public void addPredicate (BugreportCollector.Predicate p)
매개변수 | |
---|---|
p |
BugreportCollector.Predicate |
blockUntilIdle
public void blockUntilIdle ()
수집기가 버그 신고를 수집하지 않을 때까지 차단합니다. 수집기가 버그 신고를 수집하고 있지 않으면 즉시 반환
getSummary
public TestSummary getSummary ()
반환 값 | |
---|---|
TestSummary |
invocationEnded
public void invocationEnded (long elapsedTime)
매개변수 | |
---|---|
elapsedTime |
long |
invocationFailed
public void invocationFailed (Throwable cause)
매개변수 | |
---|---|
cause |
Throwable |
invocationStarted
public void invocationStarted (IInvocationContext context)
매개변수 | |
---|---|
context |
IInvocationContext |
setAsynchronous
public void setAsynchronous (boolean asynchronous)
버그 신고 수집이 다른 스레드에서 버그 신고를 수집해야 하는지(asynchronous = true
) 또는 버그 신고가 캡처될 때까지 호출자를 차단해야 하는지(asynchronous = false
) 설정합니다.
매개변수 | |
---|---|
asynchronous |
boolean |
setDescriptiveName
public void setDescriptiveName (String name)
버그 신고를 기록할 때 사용할 설명이 포함된 이름을 설정합니다. null
인 경우 BugreportCollector
은 버그 신고가 수집된 이벤트의 이름을 직렬화하는 기본 동작으로 대체됩니다.
매개변수 | |
---|---|
name |
String |
setDeviceWaitTime
public void setDeviceWaitTime (int waitTime)
버그 신고를 캡처하기 전에 기기가 온라인 상태가 될 때까지 기다릴 시간 (초)을 설정합니다. 값이 음수이면 검사가 실행되지 않습니다. 이 검사 중에 발견된 DeviceNotAvailableException
는 로깅되고 무시됩니다.
매개변수 | |
---|---|
waitTime |
int |
testAssumptionFailure
public void testAssumptionFailure (TestDescription test, String trace)
매개변수 | |
---|---|
test |
TestDescription |
trace |
String |
testEnded
public void testEnded (TestDescription test,testMetrics)
매개변수 | |
---|---|
test |
TestDescription |
testMetrics |
|
testFailed
public void testFailed (TestDescription test, String trace)
매개변수 | |
---|---|
test |
TestDescription |
trace |
String |
testIgnored
public void testIgnored (TestDescription test)
매개변수 | |
---|---|
test |
TestDescription |
testLog
public void testLog (String dataName, LogDataType dataType, InputStreamSource dataStream)
매개변수 | |
---|---|
dataName |
String |
dataType |
LogDataType |
dataStream |
InputStreamSource |
testRunEnded
public void testRunEnded (long elapsedTime,runMetrics)
매개변수 | |
---|---|
elapsedTime |
long |
runMetrics |
|
testRunFailed
public void testRunFailed (String errorMessage)
매개변수 | |
---|---|
errorMessage |
String |
testRunStarted
public void testRunStarted (String runName, int testCount)
매개변수 | |
---|---|
runName |
String |
testCount |
int |
testRunStopped
public void testRunStopped (long elapsedTime)
매개변수 | |
---|---|
elapsedTime |
long |
testStarted
public void testStarted (TestDescription test)
매개변수 | |
---|---|
test |
TestDescription |