PrettyTestEventLogger
public
class
PrettyTestEventLogger
extends Object
implements
ITestInvocationListener
| java.lang.Object | |
| ↳ | com.android.tradefed.testtype.host.PrettyTestEventLogger |
イベントを照合して記録し、デバッグを容易にするロガー。ホスト側とデバイス側のログは厳密に一致するため、簡単に検索できます。
概要
パブリック コンストラクタ | |
|---|---|
PrettyTestEventLogger(List<ITestDevice> devices, boolean methodLevelLogging)
|
|
パブリック メソッド | |
|---|---|
void
|
testEnded(TestDescription test, HashMap<String, MetricMeasurement.Metric> testMetrics)
個々のテストケースの実行終了を報告します。 |
void
|
testFailed(TestDescription test, FailureDescription failure)
個々のテストケースの失敗を報告します。 |
void
|
testFailed(TestDescription test, String trace)
個々のテストケースの失敗を報告します。 |
void
|
testRunEnded(long elapsedTimeMillis, HashMap<String, MetricMeasurement.Metric> runMetrics)
テスト実行の終了を報告します。 |
void
|
testRunStarted(String runName, int testCount)
テスト実行の開始を報告します。 |
void
|
testStarted(TestDescription test)
個々のテストケースの開始を報告します。 |
パブリック コンストラクタ
PrettyTestEventLogger
public PrettyTestEventLogger (List<ITestDevice> devices, boolean methodLevelLogging)
| パラメータ | |
|---|---|
devices |
List |
methodLevelLogging |
boolean |
パブリック メソッド
testEnded
public void testEnded (TestDescription test, HashMap<String, MetricMeasurement.Metric> testMetrics)
個々のテストケースの実行終了を報告します。
testFailed(TestDescription, FailureDescription) が呼び出されなかった場合、このテストは成功しています。また、テストケースの実行中に生成された Key-Value
指標も返します。
| パラメータ | |
|---|---|
test |
TestDescription: テストを識別します |
testMetrics |
HashMap: 生成された指標の 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,
HashMap<String, MetricMeasurement.Metric> runMetrics)テスト実行の終了を報告します。FIXME: 型が異なる 2 つの Map<> インターフェースを使用することはできないため、 ここでは HashMap を使用する必要があります。
| パラメータ | |
|---|---|
elapsedTimeMillis |
long: デバイスから報告された経過時間(ミリ秒) |
runMetrics |
HashMap: テスト実行の終了時に Metric で報告された Key-Value ペア。 |
testRunStarted
public void testRunStarted (String runName,
int testCount)テスト実行の開始を報告します。
| パラメータ | |
|---|---|
runName |
String: テスト実行名 |
testCount |
int: テスト実行のテストの合計数 |
testStarted
public void testStarted (TestDescription test)
個々のテストケースの開始を報告します。古いインターフェースです。可能な限り testStarted(TestDescription) を使用してください。
| パラメータ | |
|---|---|
test |
TestDescription: テストを識別します |