測試記錄器
public interface ITestLogger
com.android.tradefed.log.ITestLogger |
已知的間接子類 AggregatePostProcessor 、 AtraceCollector 、 AtraceRunMetricCollector 、 AveragePostProcessor 、 BaseDeviceMetricCollector 、 BasePostProcessor 、 BluetoothConnectionLatencyCollector 、 BluetoothConnectionStateCollector 、 BluetoothConnectionSuccessRatePostProcessor 、 BluetoothHciSnoopLogCollector 、 BugreportCollector 、 BugreportzOnFailureCollector 、 BugreportzOnTestCaseFailureCo llector 、 ClangCodeCoverageCollector 、 CollectingTestListener和其他 73 個。
|
可以執行各種類型的數據流日誌記錄的實體。
概括
公共方法 | |
---|---|
default void | testLog (String dataName, LogDataType dataType, InputStreamSource dataStream) 提供來自測試調用的關聯日誌或調試數據。 |
公共方法
測試日誌
public void testLog (String dataName, LogDataType dataType, InputStreamSource dataStream)
提供來自測試調用的關聯日誌或調試數據。
必須在ERROR(/ITestInvocationListener#invocationFailed(Throwable))
或ERROR(/ITestInvocationListener#invocationEnded(long))
之前調用TradeFederation 框架將自動調用此方法,提供主機日誌和設備 logcat(如果適用)。參數 | |
---|---|
dataName | String :數據的String 描述性名稱。例如“device_logcat”。注意 每次調用時 dataName 可能不是唯一的。即實現者必須能夠處理具有相同 dataName 的多個調用 |
dataType | LogDataType :數據的LogDataType |
dataStream | InputStreamSource :數據的InputStreamSource 。實現者應該調用 createInputStream 來開始讀取數據,並確保完成後關閉生成的 InputStream。調用者應確保數據源保持存在且可訪問,直到 testLog 方法完成。 |