LogcatCrashResultForwarder

public class LogcatCrashResultForwarder
extends ResultForwarder

java.lang.Object
com.android.tradefed.result.ResultForwarder
com.android.tradefed.result.LogcatCrashResultForwarder


特別なリスナー: 障害 (インスツルメンテーション プロセスのクラッシュ) が発生すると、logcat からクラッシュを抽出しようとし、それをテストに関連付けられた障害メッセージに追加します。

まとめ

定数

int MAX_NUMBER_CRASH

田畑

public static final String ERROR_MESSAGE

デバイス側で問題が発生した場合のインストルメンテーションからの特別なエラー メッセージ。

public static final String INCOMPLETE_MESSAGE

public static final String SYSTEM_CRASH_MESSAGE

public static final TIMEOUT_MESSAGES

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

LogcatCrashResultForwarder ( ITestDevice device, ITestInvocationListener... listeners)

公開メソッド

ITestDevice getDevice ()
void setPackageName (String packageName)
void testEnded ( TestDescription test, long endTime, testMetrics) testEnded ( TestDescription test, long endTime, testMetrics)

ERROR(/#testEnded(com.android.tradefed.result.TestDescription,Map))の代わりに、終了時間を直接指定できます。

void testFailed ( TestDescription test, FailureDescription failure)

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

void testFailed ( TestDescription test, String trace)

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

void testRunEnded (long elapsedTime, runMetrics) testRunEnded (long elapsedTime, runMetrics)

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

void testRunFailed ( FailureDescription error)

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

void testRunFailed (String errorMessage)

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

void testStarted ( TestDescription test, long startTime)

testStarted(com.android.tradefed.result.TestDescription)の代わりに、正確な測定のためERROR(/#testEnded(com.android.tradefed.result.TestDescription,long,Map))と組み合わせて、テストの開始時期も指定します。 .

定数

MAX_NUMBER_CRASH

public static final int MAX_NUMBER_CRASH

定数値: 3 (0x00000003)

田畑

エラーメッセージ

public static final String ERROR_MESSAGE

デバイス側で問題が発生した場合のインストルメンテーションからの特別なエラー メッセージ。

INCOMPLETE_MESSAGE

public static final String INCOMPLETE_MESSAGE

SYSTEM_CRASH_MESSAGE

public static final String SYSTEM_CRASH_MESSAGE

TIMEOUT_MESSAGES

public static final  TIMEOUT_MESSAGES

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

LogcatCrashResultForwarder

public LogcatCrashResultForwarder (ITestDevice device, 
                ITestInvocationListener... listeners)

パラメーター
device ITestDevice

listeners ITestInvocationListener

公開メソッド

getDevice

public ITestDevice getDevice ()

戻り値
ITestDevice

setPackageName

public void setPackageName (String packageName)

パラメーター
packageName String

テスト終了

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 : ERROR(/System#currentTimeMillis())を介して測定された、テストが終了した時間

testMetrics : 発行されたメトリックのERROR(/Map)

テスト失敗

public void testFailed (TestDescription test, 
                FailureDescription failure)

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

testStarted と testEnded の間で呼び出されます。

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

failure FailureDescription : 失敗とそのコンテキストを説明するFailureDescription

テスト失敗

public void testFailed (TestDescription test, 
                String trace)

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

testStarted と testEnded の間で呼び出されます。

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

trace String : 失敗のスタック トレース

testRunEnded

public void testRunEnded (long elapsedTime, 
                 runMetrics)

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

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

runMetrics : Metricでのテスト実行の最後に報告されるキーと値のペア。

testRunFailed

public void testRunFailed (FailureDescription error)

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

パラメーター
error FailureDescription : 失敗とそのコンテキストを説明するFailureDescription

testRunFailed

public void testRunFailed (String errorMessage)

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

パラメーター
errorMessage String : 実行失敗の理由を説明するERROR(/String)

テスト開始

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 : ERROR(/System#currentTimeMillis())を介して測定された、テストの開始時間