JUnitToIncationResultForwarder
public class JUnitToInvocationResultForwarder
extends Object
implements TestListener
java.lang.Object |
↳ | com.android.tradefed.result.JUnitToInitationResultForwarder |
偵聽TestListener
事件並將它們轉送到ITestInvocationListener
的類別。
概括
公共構造函數
JUnitToIncationResultForwarder
public JUnitToInvocationResultForwarder (ITestInvocationListener invocationListener)
參數 |
---|
invocationListener | ITestInvocationListener |
JUnitToIncationResultForwarder
public JUnitToInvocationResultForwarder ( invocationListeners)
公共方法
新增錯誤
public void addError (Test test,
Throwable t)
新增失敗
public void addFailure (Test test,
AssertionFailedError t)
參數 |
---|
test | Test |
t | AssertionFailedError |
結束測試
public void endTest (Test test,
metrics)
來自可以轉送指標的 JUnit3 測試的回呼。
參數 |
---|
test | Test :剛執行完畢的Test 。 |
metrics | :要傳遞給結果回調的 Map 格式的指標。 |
結束測試
public void endTest (Test test)
開始測試
public void startTest (Test test)
public void testLog (String dataName,
LogDataType dataType,
InputStreamSource dataStream)
來自 JUnit3 轉發器的回調,以便從測試中取得日誌。
參數 |
---|
dataName | String :資料的字串描述性名稱。例如“device_logcat”。注意 每次呼叫時 dataName 可能不是唯一的。即實現者必須能夠處理具有相同 dataName 的多個呼叫 |
dataType | LogDataType :資料的LogDataType |
dataStream | InputStreamSource :資料的InputStreamSource。實作者應該呼叫 createInputStream 來開始讀取數據,並確保完成後關閉產生的 InputStream。呼叫者應確保資料來源保持存在且可訪問,直到 testLog 方法完成。 |