ResultReporter
public
class
ResultReporter
extends Object
implements
IConfigurationReceiver,
ILogSaverListener,
ISupportGranularResults,
ITestSummaryListener
| java.lang.Object | |
| ↳ | com.google.android.tradefed.result.teststorage.ResultReporter |
概要
ネストされたクラス | |
|---|---|
class |
ResultReporter.ListBuilder<T>
|
定数 | |
|---|---|
String |
DEFAULT_BUILDPROVIDER
|
String |
EXPERIMENTAL
|
String |
SYSTEM_CHECKER
|
String |
TRADEFED
|
パブリック コンストラクタ | |
|---|---|
ResultReporter()
|
|
パブリック メソッド | |
|---|---|
void
|
enableFilterProperty(boolean enableFilterProperty)
|
IConfiguration
|
getConfiguration()
|
TestSummary
|
getSummary()
InvocationListener が概要を返すことを許可します。 |
void
|
invocationEnded(long elapsedTime)
呼び出しが終了したことを報告します(成功した場合も、エラー条件が原因で終了した場合も同様です)。 |
void
|
invocationFailed(FailureDescription failure)
エラー条件により呼び出しが不完全になったことを報告します。 |
void
|
invocationFailed(Throwable cause)
エラー条件により呼び出しが不完全になったことを報告します。 |
void
|
invocationSkipped(SkipReason reason)
呼び出しをスキップとして報告します。 |
void
|
invocationStarted(IInvocationContext context)
テスト呼び出しの開始を報告します。 |
void
|
logAssociation(String dataName, LogFile log)
場合によっては、ログをテストケースに強く関連付ける必要がありますが、直接の |
void
|
putEarlySummary(
構成の一部としてインスタンス化された |
void
|
setConfiguration(IConfiguration configuration)
使用中の |
void
|
setLogSaver(ILogSaver logSaver)
実装者がファイルを保存できるように |
boolean
|
supportGranularResults()
レポートが詳細な結果をサポートしている場合は True、そうでない場合は False を返します。 |
void
|
testAssumptionFailure(TestDescription test, String trace)
アトミック テストが、false の条件を想定していることを示すフラグを設定したときに呼び出されます。 |
void
|
testAssumptionFailure(TestDescription test, FailureDescription failure)
アトミック テストが、false の条件を想定していることを示すフラグを設定したときに呼び出されます。 |
void
|
testEnded(TestDescription test, long endTime,
終了時間を直接指定できる |
void
|
testEnded(TestDescription test,
個々のテストケースの実行終了を報告します。 |
void
|
testFailed(TestDescription test, FailureDescription failure)
個々のテストケースの失敗を報告します。 |
void
|
testFailed(TestDescription test, String trace)
個々のテストケースの失敗を報告します。 |
void
|
testIgnored(TestDescription test)
テストが実行されない場合に呼び出されます。通常、テストメソッドに org.junit.Ignore のアノテーションが付いていることが原因です。 |
void
|
testModuleEnded()
モジュール実行の終了を報告します。 |
void
|
testModuleStarted(IInvocationContext moduleContext)
モジュールの実行の開始を報告します。 |
void
|
testRunEnded(long elapsedTimeMillis,
テスト実行の終了を報告します。 |
void
|
testRunFailed(FailureDescription failure)
|
void
|
testRunFailed(String errorMessage)
致命的なエラーのため、レポートのテスト実行を完了できませんでした。 |
void
|
testRunStarted(String runName, int testCount, int attemptNumber)
テスト実行の開始を報告します。 |
void
|
testRunStarted(String runName, int testCount)
テスト実行の開始を報告します。 |
void
|
testRunStarted(String runName, int testCount, int attemptNumber, long startTime)
テスト実行の開始を報告します。 |
void
|
testSkipped(TestDescription test, SkipReason reason)
テストがスキップされ、通常は想定されない理由で実行されなかった場合に呼び出されます。 |
void
|
testStarted(TestDescription test, long startTime)
|
void
|
testStarted(TestDescription test)
個々のテストケースの開始を報告します。 |
保護されたメソッド | |
|---|---|
ITestStorageClient
|
createTestStorageClient(IInvocationContext context)
|
String
|
getVersion()
|
定数
DEFAULT_BUILDPROVIDER
public static final String DEFAULT_BUILDPROVIDER
定数値: "androidbuild"
エクスペリメンタル
public static final String EXPERIMENTAL
定数値: "experimental"
SYSTEM_CHECKER
public static final String SYSTEM_CHECKER
定数値: "system_checker"
TRADEFED
public static final String TRADEFED
定数値: "tradefed"
パブリック コンストラクタ
ResultReporter
public ResultReporter ()
パブリック メソッド
enableFilterProperty
public void enableFilterProperty (boolean enableFilterProperty)
| パラメータ | |
|---|---|
enableFilterProperty |
boolean |
getSummary
public TestSummary getSummary ()
InvocationListener が概要を返すことを許可します。
| 戻り値 | |
|---|---|
TestSummary |
実行を要約する TestSummary。null の場合もあります。 |
invocationEnded
public void invocationEnded (long elapsedTime)
呼び出しが終了したことを報告します(成功した場合も、エラー条件が原因で終了した場合も同様です)。
TradeFederation フレームワークによって自動的に呼び出されます。
| パラメータ | |
|---|---|
elapsedTime |
long: 呼び出しの経過時間(ミリ秒単位) |
invocationFailed
public void invocationFailed (FailureDescription failure)
エラー条件により呼び出しが不完全になったことを報告します。
TradeFederation フレームワークによって自動的に呼び出されます。
| パラメータ | |
|---|---|
failure |
FailureDescription: 障害の原因を説明する FailureDescription |
invocationFailed
public void invocationFailed (Throwable cause)
エラー条件により呼び出しが不完全になったことを報告します。
TradeFederation フレームワークによって自動的に呼び出されます。
| パラメータ | |
|---|---|
cause |
Throwable: 失敗の Throwable 原因 |
invocationSkipped
public void invocationSkipped (SkipReason reason)
呼び出しをスキップとして報告します
| パラメータ | |
|---|---|
reason |
SkipReason |
invocationStarted
public void invocationStarted (IInvocationContext context)
テスト呼び出しの開始を報告します。
TradeFederation フレームワークによって自動的に呼び出されます。複数のデバイスのレポートをサポートするには、レポート作成者がこのメソッドをオーバーライドする必要があります。
| パラメータ | |
|---|---|
context |
IInvocationContext: 呼び出しに関する情報 |
logAssociation
public void logAssociation (String dataName,
LogFile log)場合によっては、ログをテストケースに強く関連付ける必要がありますが、直接 testLogSaved(String, com.android.tradefed.result.LogDataType, com.android.tradefed.result.InputStreamSource, com.android.tradefed.result.LogFile) コールバックでそれを行うことはできません。したがって、このコールバックを使用すると、強力な関連付けを明示的に指定できます。
| パラメータ | |
|---|---|
dataName |
String: データの名前 |
log |
LogFile: 以前にロギングされ、テストケースに関連付ける必要がある LogFile。 |
putEarlySummary
public void putEarlySummary (summaries)
構成の一部としてインスタンス化された ITestInvocationListener から返された可能性がある、null 以外の TestSummary の ERROR(/List) を渡します。早期の要約は ITestInvocationListener.invocationStarted(com.android.tradefed.invoker.IInvocationContext) の後に生成され、ERROR(/#putSummary(List)) を介して呼び出しの最後に完了できます。
これは ITestInvocationListener.invocationStarted(com.android.tradefed.invoker.IInvocationContext) の前に呼び出され、その前に構成されたリスナーからのすべての概要が含まれます。
| パラメータ | |
|---|---|
summaries |
: 現在の構成の一部である ITestInvocationListener からの null 以外の TestSummary の ERROR(/List)。 |
setConfiguration
public void setConfiguration (IConfiguration configuration)
使用中の IConfiguration を挿入します。
| パラメータ | |
|---|---|
configuration |
IConfiguration |
setLogSaver
public void setLogSaver (ILogSaver logSaver)
実装者がファイルを保存できるように ILogSaver を設定します。
| パラメータ | |
|---|---|
logSaver |
ILogSaver: ILogSaver |
supportGranularResults
public boolean supportGranularResults ()
レポーターが詳細な結果をサポートしている場合は True、そうでない場合は False を返します。
| 戻り値 | |
|---|---|
boolean |
|
testAssumptionFailure
public void testAssumptionFailure (TestDescription test, String trace)
アトミック テストが、false の条件を想定していることを示すフラグを設定したときに呼び出されます
| パラメータ | |
|---|---|
test |
TestDescription: テストを識別します |
trace |
String: 失敗のスタック トレース |
testAssumptionFailure
public void testAssumptionFailure (TestDescription test, FailureDescription failure)
アトミック テストが、false の条件を想定していることを示すフラグを設定したときに呼び出されます
| パラメータ | |
|---|---|
test |
TestDescription: テストを識別します |
failure |
FailureDescription: 失敗とそのコンテキストを説明する FailureDescription。 |
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) |
testEnded
public void testEnded (TestDescription test,metrics)
個々のテストケースの実行終了を報告します。
testFailed(TestDescription, FailureDescription) が呼び出されなかった場合、このテストは合格です。テストケースの実行中に生成された Key-Value 指標も返します。
| パラメータ | |
|---|---|
test |
TestDescription: テストを識別します |
metrics |
: 出力された指標の 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: テストを識別します |
testModuleEnded
public void testModuleEnded ()
モジュール実行の終了を報告します。
testModuleStarted
public void testModuleStarted (IInvocationContext moduleContext)
モジュールの実行開始を報告します。このコールバックは testModuleEnded() に関連付けられており、シーケンスでは省略可能です。モジュールを使用する実行(スイートベースのランナー)でのみ使用されます。
| パラメータ | |
|---|---|
moduleContext |
IInvocationContext: モジュールの IInvocationContext。 |
testRunEnded
public void testRunEnded (long elapsedTimeMillis,
runMetrics) テスト実行の終了を報告します。
| パラメータ | |
|---|---|
elapsedTimeMillis |
long: デバイスが報告した経過時間(ミリ秒単位) |
runMetrics |
: テスト実行の最後にレポートされる Key-Value ペア |
testRunFailed
public void testRunFailed (FailureDescription failure)
FailureDescription で説明されているエラーのため、テスト実行が完了しなかったことを報告します。
| パラメータ | |
|---|---|
failure |
FailureDescription: 失敗とそのコンテキストを説明する FailureDescription。 |
testRunFailed
public void testRunFailed (String errorMessage)
致命的なエラーのため、レポートのテスト実行を完了できませんでした。
| パラメータ | |
|---|---|
errorMessage |
String: 実行の失敗理由を説明する String。 |
testRunStarted
public void testRunStarted (String runName,
int testCount,
int attemptNumber)テスト実行の開始を報告します。
| パラメータ | |
|---|---|
runName |
String: テスト実行名 |
testCount |
int: テスト実行のテストの合計数 |
attemptNumber |
int: 実行名が同じで複数回実行される異なる試行を識別する注文番号。attemptNumber は 0 から始まり、新しい実行が発生するたびに増分されます。たとえば、テストが 3 回きめ細かく再試行された場合、同じ runName で合計 4 回の実行が行われ、attemptNumber は 0 ~ 3 になります。 |
testRunStarted
public void testRunStarted (String runName,
int testCount)テスト実行の開始を報告します。
| パラメータ | |
|---|---|
runName |
String: テスト実行名 |
testCount |
int: テスト実行のテストの合計数 |
testRunStarted
public void testRunStarted (String runName,
int testCount,
int attemptNumber,
long startTime)テスト実行の開始を報告します。
| パラメータ | |
|---|---|
runName |
String: テスト実行名 |
testCount |
int: テスト実行のテストの合計数 |
attemptNumber |
int: 実行名が同じで複数回実行される異なる試行を識別する注文番号。attemptNumber は 0 から始まるインデックスで、新しい実行が発生するたびに増分されます。たとえば、テストが 3 回きめ細かく再試行される場合、同じ runName で合計 4 回の実行が行われ、attemptNumber は 0 から 3 になります。 |
startTime |
long: 実行が開始された時刻(System.currentTimeMillis() で測定) |
testSkipped
public void testSkipped (TestDescription test, SkipReason reason)
テストがスキップされ、通常は想定されない理由で実行されなかった場合に呼び出されます。これらのテストは、適切な実行を試みるために再試行されます。
| パラメータ | |
|---|---|
test |
TestDescription: テストを識別します |
reason |
SkipReason: SkipReason |
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() で測定) |
testStarted
public void testStarted (TestDescription test)
個々のテストケースの開始を報告します。古いインターフェース。可能な限り testStarted(com.android.tradefed.result.TestDescription) を使用する必要があります。
| パラメータ | |
|---|---|
test |
TestDescription: テストを識別します |
保護されたメソッド
createTestStorageClient
protected ITestStorageClient createTestStorageClient (IInvocationContext context)
| パラメータ | |
|---|---|
context |
IInvocationContext |
| 戻り値 | |
|---|---|
ITestStorageClient |
|
getVersion
protected String getVersion ()
| 戻り値 | |
|---|---|
String |
|