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 |