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 : 測試運行中的測試總數