ShardListener

public class ShardListener
extends CollectingTestListener implements ISupportGranularResults

java.lang.Object
   ↳ com.android.tradefed.result.CollectingTestListener
     ↳ com.android.tradefed.invoker.ShardListener


ITestInvocationListener ที่รวบรวมผลลัพธ์จากกลุ่มการเรียกใช้ (หรือที่เรียกว่าการแยกการเรียกใช้เพื่อเรียกใช้หลายรายการพร้อมกันในหลายทรัพยากร) และส่งต่อไปยังโปรแกรมฟังอื่น

สรุป

ตัวสร้างแบบสาธารณะ

ShardListener(ITestInvocationListener main)

สร้าง ShardListener

เมธอดสาธารณะ

void invocationEnded(long elapsedTime)

void invocationFailed(FailureDescription failure)

void invocationFailed(Throwable cause)

void invocationStarted(IInvocationContext context)

void setSupportGranularResults(boolean enableGranularResults)
boolean supportGranularResults()

void testLog(String dataName, LogDataType dataType, InputStreamSource dataStream)

void testLogSaved(String dataName, LogDataType dataType, InputStreamSource dataStream, LogFile logFile)

void testModuleEnded()

void testModuleStarted(IInvocationContext moduleContext)

void testRunEnded(long elapsedTime, runMetrics)

void testRunFailed(FailureDescription failure)

void testRunFailed(String failureMessage)

void testRunStarted(String name, int numTests, int attemptNumber, long startTime)

ตัวสร้างแบบสาธารณะ

ShardListener

public ShardListener (ITestInvocationListener main)

สร้าง ShardListener

พารามิเตอร์
main ITestInvocationListener: ITestInvocationListener ที่ควรส่งต่อผลลัพธ์ ออบเจ็กต์นี้จะซิงค์ใน main เมื่อส่งต่อผลลัพธ์เพื่อป้องกันไม่ให้มี ShardListener รายการอื่นทับซ้อนกัน และระบบจะส่งผลลัพธ์ก็ต่อเมื่อกลุ่มการเรียกใช้เสร็จสมบูรณ์เท่านั้น

เมธอดสาธารณะ

invocationEnded

public void invocationEnded (long elapsedTime)

พารามิเตอร์
elapsedTime long

invocationFailed

public void invocationFailed (FailureDescription failure)

พารามิเตอร์
failure FailureDescription

invocationFailed

public void invocationFailed (Throwable cause)

พารามิเตอร์
cause Throwable

invocationStarted

public void invocationStarted (IInvocationContext context)

พารามิเตอร์
context IInvocationContext

setSupportGranularResults

public void setSupportGranularResults (boolean enableGranularResults)

พารามิเตอร์
enableGranularResults boolean

supportGranularResults

public boolean supportGranularResults ()

คิกรีเทิร์น
boolean

testLog

public void testLog (String dataName, 
                LogDataType dataType, 
                InputStreamSource dataStream)

พารามิเตอร์
dataName String

dataType LogDataType

dataStream InputStreamSource

testLogSaved

public void testLogSaved (String dataName, 
                LogDataType dataType, 
                InputStreamSource dataStream, 
                LogFile logFile)

พารามิเตอร์
dataName String

dataType LogDataType

dataStream InputStreamSource

logFile LogFile

testModuleEnded

public void testModuleEnded ()

testModuleStarted

public void testModuleStarted (IInvocationContext moduleContext)

พารามิเตอร์
moduleContext IInvocationContext

testRunEnded

public void testRunEnded (long elapsedTime, 
                 runMetrics)

พารามิเตอร์
elapsedTime long

runMetrics

testRunFailed

public void testRunFailed (FailureDescription failure)

พารามิเตอร์
failure FailureDescription

testRunFailed

public void testRunFailed (String failureMessage)

พารามิเตอร์
failureMessage String

testRunStarted

public void testRunStarted (String name, 
                int numTests, 
                int attemptNumber, 
                long startTime)

พารามิเตอร์
name String

numTests int

attemptNumber int

startTime long