PrettyTestEventLogger

public class PrettyTestEventLogger
extends Object implements ITestInvocationListener

java.lang.Object
com.android.tradefed.testtype.host.PrettyTestEventLogger


記錄器匹配事件並記錄它們以便更容易調試。主機端和裝置端的日誌會嚴格匹配,以便於尋找。

概括

公共構造函數

PrettyTestEventLogger ( devices) PrettyTestEventLogger ( devices)

公共方法

void testEnded ( TestDescription test, testMetrics) testEnded ( TestDescription test, testMetrics)

報告單一測試案例的執行結束。

void testFailed ( TestDescription test, String trace)

報告單一測試用例的失敗。

void testStarted ( TestDescription test)

報告單一測試用例的開始。

公共構造函數

PrettyTestEventLogger

public PrettyTestEventLogger ( devices)

參數
devices

公共方法

測試結束

public void testEnded (TestDescription test, 
                 testMetrics)

報告單一測試案例的執行結束。

如果未呼叫testFailed(TestDescription, FailureDescription) ,則此測試通過。也會傳回測試案例執行期間可能發出的任何鍵/值指標。

參數
test TestDescription :標識測試

testMetrics :發出的指標的ERROR(/Map)

測試失敗

public void testFailed (TestDescription test, 
                String trace)

報告單一測試用例的失敗。

將在 testStarted 和 testEnded 之間呼叫。

參數
test TestDescription :標識測試

trace String : 失敗的堆疊追蹤

測試開始

public void testStarted (TestDescription test)

報告單一測試用例的開始。較舊的接口,應盡可能使用testStarted(com.android.tradefed.result.TestDescription)

參數
test TestDescription :標識測試