JarHostTest.HostTestListener

public class JarHostTest.HostTestListener
extends ResultForwarder

java.lang.Object
com.android.tradefed.result.ResultForwarder
com.android.compatibility.common.tradefed.testtype.JarHostTest.HostTestListener


包裝偵聽器,將 testRunStarted() 和 testRunEnded() 之外的所有事件轉送到嵌入式偵聽器。 jar 中的每個測試類別都會呼叫這些事件,HostTestListener 會從偵聽器中保留這些事件以進行控制台日誌記錄和結果報告。

概括

公共構造函數

HostTestListener ( ITestInvocationListener listener)

公共方法

void testRunEnded (long elapsedTime, metrics) testRunEnded (long elapsedTime, metrics)

報告測試運行結束。

void testRunStarted (String name, int numTests)

報告測試運行的開始。

公共構造函數

主機測試監聽器

public HostTestListener (ITestInvocationListener listener)

參數
listener ITestInvocationListener

公共方法

測試運行結束

public void testRunEnded (long elapsedTime, 
                 metrics)

報告測試運行結束。 FIXME:我們不能有兩個不同類型的 Map<> 接口,所以我們必須在這裡使用 HashMap。

參數
elapsedTime long :設備報告的經過時間,以毫秒為單位

metrics :使用Metric測試運行結束時報告的鍵值對。

測試運行開始

public void testRunStarted (String name, 
                int numTests)

報告測試運行的開始。

參數
name String : 測試運行名稱

numTests int : 測試運行中的測試總數