PrettyTestEventLogger
public class PrettyTestEventLogger
extends Object
implements ITestInvocationListener
java.lang.Object | |
↳ | com.android.tradefed.testtype.host.PrettyTestEventLogger |
記錄器匹配事件並記錄它們,以便更容易調試。 host端和device端的log會嚴格匹配,方便查找。
概括
公共構造函數 | |
---|---|
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 :標識測試 |