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, 終了時間を直接指定できる  | 
| 
        
        
        
        
        
        void | 
      testFailed(TestDescription test, FailureDescription failure)
      個々のテストケースの失敗を報告します。 | 
| 
        
        
        
        
        
        void | 
      testFailed(TestDescription test, String trace)
      個々のテストケースの失敗を報告します。 | 
| 
        
        
        
        
        
        void | 
      testRunEnded(long elapsedTime, テスト実行の終了を報告します。 | 
| 
        
        
        
        
        
        void | 
      testRunFailed(FailureDescription error)
      
 | 
| 
        
        
        
        
        
        void | 
      testRunFailed(String errorMessage)
      致命的なエラーが発生したため、レポートのテスト実行が完了しませんでした。 | 
| 
        
        
        
        
        
        void | 
      testStarted(TestDescription test, long startTime)
      
 | 
定数
MAX_NUMBER_CRASH
public static final int MAX_NUMBER_CRASH
定数値: 3 (0x00000003)
フィールド
ERROR_MESSAGE
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 finalTIMEOUT_MESSAGES 
パブリック コンストラクタ
LogcatCrashResultForwarder
public LogcatCrashResultForwarder (ITestDevice device, ITestInvocationListener... listeners)
| パラメータ | |
|---|---|
| device | ITestDevice | 
| listeners | ITestInvocationListener | 
パブリック メソッド
setPackageName
public void setPackageName (String packageName)
| パラメータ | |
|---|---|
| packageName | String | 
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) | 
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 error)
FailureDescription で説明されているエラーのため、テスト実行を完了できなかったことをレポートします。
| パラメータ | |
|---|---|
| error | FailureDescription: エラーとそのコンテキストを記述するFailureDescription。 | 
testRunFailed
public void testRunFailed (String errorMessage)
致命的なエラーが発生したため、レポートのテスト実行が完了しませんでした。
| パラメータ | |
|---|---|
| errorMessage | String: 実行失敗の理由を説明するString。 | 
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()で測定) | 
