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, 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, 
                 runMetrics)

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

パラメータ
elapsedTime 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)

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

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

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