ModuleResultsAndMetricsForwarder

public class ModuleResultsAndMetricsForwarder
extends ResultAndLogForwarder

java.lang.Object
   ↳ com.android.tradefed.result.ResultForwarder
     ↳ com.android.tradefed.result.ResultAndLogForwarder
       ↳ com.android.tradefed.result.ModuleResultsAndMetricsForwarder


テスト結果にモジュール関連の追加指標を追加する ResultAndLogForwarder の拡張機能。

概要

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

ModuleResultsAndMetricsForwarder(ITestInvocationListener... listeners)

パブリック メソッド

void setAttemptIsolation(CurrentInvocation.IsolationGrade isolation)

試行を分離されたものとして報告するかどうかを設定します。

void setModuleId(String moduleId)
void setTestMappingSources( testMappingSources)

指標に挿入されるテスト マッピング ソースを設定します。

void testEnded(TestDescription test, long endTime, testMetrics)

終了時間を直接指定できる ERROR(/#testEnded(com.android.tradefed.result.TestDescription,Map)) の代替手段。

void testEnded(TestDescription test, testMetrics)

個々のテストケースの実行終了を報告します。

void testFailed(TestDescription test, FailureDescription failure)

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

void testFailed(TestDescription test, String trace)

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

void testRunEnded(long elapsedTimeMillis, runMetrics)

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

void testRunFailed(FailureDescription failure)

FailureDescription で説明されているエラーが原因で、テスト実行が完了しなかったことを報告します。

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 testStarted(TestDescription test, long startTime)

testStarted(com.android.tradefed.result.TestDescription) の代替手段。テストの開始日時も指定します。ERROR(/#testEnded(com.android.tradefed.result.TestDescription,long,Map)) と組み合わせて正確な測定を行います。

void testStarted(TestDescription test)

個々のテストケースの開始を報告します。

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

ModuleResultsAndMetricsForwarder

public ModuleResultsAndMetricsForwarder (ITestInvocationListener... listeners)

パラメータ
listeners ITestInvocationListener

パブリック メソッド

setAttemptIsolation

public void setAttemptIsolation (CurrentInvocation.IsolationGrade isolation)

試行を分離されたものとして報告するかどうかを設定します。

パラメータ
isolation CurrentInvocation.IsolationGrade

setModuleId

public void setModuleId (String moduleId)

パラメータ
moduleId String

setTestMappingSources

public void setTestMappingSources ( testMappingSources)

指標に挿入されるテスト マッピング ソースを設定します。

パラメータ
testMappingSources

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

個々のテストケースの実行終了を報告します。

testFailed(TestDescription, FailureDescription) が呼び出されなかった場合、このテストは合格です。また、テストケースの実行中に出力された Key-Value 指標も返します。

パラメータ
test TestDescription: テストを識別します。

testMetrics : 出力された指標の 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: 障害のスタック トレース

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: オーダー番号。同じ runName を複数回実行する際の試行を識別します。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: オーダー番号。同じ runName を複数回実行する際の試行を識別します。attemptNumber は 0 から始まり、新しい実行が行われるたびにインクリメントされます。たとえば、テストが 3 回きめ細かく再試行される場合、同じ runName で合計 4 回の実行が行われ、attemptNumber は 0 ~ 3 になります。

startTime long: 実行が開始された時刻(System.currentTimeMillis() で測定)

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: テストを識別します。