TestRunResultListener

public final class TestRunResultListener
extends Object implements ITestInvocationListener

java.lang.Object
   ↳ com.android.tradefed.result.TestRunResultListener


最終的なテスト実行ステータスを読み取ることができるリスナー。

概要

パブリック コンストラクタ

TestRunResultListener()

パブリック メソッド

boolean isTestFailed(String testName)
boolean isTestRunFailed(String testRunName)
void testFailed(TestDescription test, FailureDescription failure)

個々のテストケースの失敗を報告します。

void testFailed(TestDescription test, String trace)

個々のテストケースの失敗を報告します。

void testRunEnded(long elapsedTime, HashMap<String, MetricMeasurement.Metric> runMetrics)

テスト実行の終了を報告します。

void testRunFailed(FailureDescription failure)

FailureDescription で説明されているエラーのため、レポート テスト実行を完了できませんでした。

void testRunFailed(String errorMessage)

致命的なエラーのため、レポートのテスト実行を完了できませんでした。

void testRunStarted(String runName, int testCount)

テスト実行の開始を報告します。

パブリック コンストラクタ

TestRunResultListener

public TestRunResultListener ()

パブリック メソッド

isTestFailed

public boolean isTestFailed (String testName)

パラメータ
testName String

戻り値
boolean

isTestRunFailed

public boolean isTestRunFailed (String testRunName)

パラメータ
testRunName String

戻り値
boolean

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 elapsedTime, 
                HashMap<String, MetricMeasurement.Metric> runMetrics)

テスト実行の終了を報告します。FIXME: 型が異なる Map<> インターフェースを 2 つ持つことはできないため、ここでは HashMap を使用する必要があります。

パラメータ
elapsedTime long: デバイスが報告した経過時間(ミリ秒単位)

runMetrics HashMap: Metric を使用したテスト実行の最後にレポートされる 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)

テスト実行の開始を報告します。

パラメータ
runName String: テスト実行名

testCount int: テスト実行のテストの合計数