ITestLogger
public interface ITestLogger
com.android.tradefed.log.ITestLogger |
รู้จักคลาสย่อยทางอ้อม AggregatePostProcessor , AtraceCollector , AtraceRunMetricCollector , AveragePostProcessor , BaseDeviceMetricCollector , BasePostProcessor , BluetoothConnectionLatencyCollector , BluetoothConnectionStateCollector , BluetoothConnectionSuccessRatePostProcessor , BluetoothHciSnoopLogCollector , BugreportCollector , BugreportzOnFailureCollector , BugreportzOnTestCaseFailureCollector , ClangCodeCoverageCollector , CollectingTestListener , and 73 others.
|
เอนทิตีที่สามารถดำเนินการบันทึกสตรีมข้อมูลประเภทต่างๆ
สรุป
วิธีการสาธารณะ | |
---|---|
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 จะเรียกใช้เมธอดนี้โดยอัตโนมัติ โดยจัดเตรียมบันทึกโฮสต์และบันทึกอุปกรณ์ (ถ้ามี)พารามิเตอร์ | |
---|---|
dataName | String : ชื่ออธิบาย ERROR(/String) ของข้อมูล เช่น "device_logcat" หมายเหตุ dataName อาจไม่ซ้ำกันต่อการเรียกใช้ คือผู้ดำเนินการต้องสามารถจัดการการโทรหลายรายการด้วย dataName เดียวกันได้ |
dataType | LogDataType : LogDataType ของข้อมูล |
dataStream | InputStreamSource : InputStreamSource ของข้อมูล Implementers ควรเรียก createInputStream เพื่อเริ่มอ่านข้อมูล และตรวจสอบให้แน่ใจว่าได้ปิด InputStream ที่เป็นผลลัพธ์เมื่อเสร็จสิ้น ผู้โทรควรตรวจสอบให้แน่ใจว่าแหล่งที่มาของข้อมูลยังคงอยู่และเข้าถึงได้จนกว่าวิธีการ testLog จะเสร็จสมบูรณ์ |