ReportPassedTests

public class ReportPassedTests
extends CollectingTestListener implements IConfigurationReceiver, ISupportGranularResults

java.lang.Object
   ↳ com.android.tradefed.result.CollectingTestListener
     ↳ com.android.tradefed.result.ReportPassedTests


在檔案中回報可能要排除通過測試的篩選器。

摘要

公用建構函式

ReportPassedTests()

公用方法

void invocationEnded(long elapsedTime)

回報是否因某種錯誤狀況而終止呼叫 (無論是否成功)。

void invocationFailed(FailureDescription failure)

Reports an incomplete invocation due to some error condition.

void invocationStarted(IInvocationContext context)

Reports the start of the test invocation.

void setConfiguration(IConfiguration configuration)

注入使用的 IConfiguration

void setLogger(ITestLogger logger)
boolean supportGranularResults()

如果檢舉者支援精細結果,則傳回 True,否則傳回 False。

void testModuleEnded()

回報模組執行作業的結束時間。

void testModuleStarted(IInvocationContext moduleContext)

回報模組的執行開始時間。

void testRunEnded(long elapsedTime, HashMap<String, MetricMeasurement.Metric> runMetrics)

Reports end of test run.

公用建構函式

ReportPassedTests

public ReportPassedTests ()

公用方法

invocationEnded

public void invocationEnded (long elapsedTime)

回報是否因某種錯誤情況而終止呼叫 (無論是否成功)。

TradeFederation 架構會自動呼叫。

參數
elapsedTime long:以毫秒為單位的呼叫經過時間

invocationFailed

public void invocationFailed (FailureDescription failure)

由於發生某些錯誤情況,因此回報不完整的叫用。

TradeFederation 架構會自動呼叫。

參數
failure FailureDescription:說明失敗原因的 FailureDescription

invocationStarted

public void invocationStarted (IInvocationContext context)

回報測試呼叫的開始時間。

TradeFederation 架構會自動呼叫這個方法。檢舉者需要覆寫這個方法,才能支援多部裝置回報。

參數
context IInvocationContext:叫用相關資訊

setConfiguration

public void setConfiguration (IConfiguration configuration)

注入使用的 IConfiguration

參數
configuration IConfiguration

setLogger

public void setLogger (ITestLogger logger)

參數
logger ITestLogger

supportGranularResults

public boolean supportGranularResults ()

如果檢舉者支援精細結果,則傳回 True,否則傳回 False。

傳回
boolean

testModuleEnded

public void testModuleEnded ()

回報模組執行作業的結束時間。

testModuleStarted

public void testModuleStarted (IInvocationContext moduleContext)

回報模組的執行開始時間。這個回呼與 testModuleEnded() 相關聯,且在序列中為選用項目。只有在使用模組的執行期間,才會使用這個標記:以套件為基礎的執行器。

參數
moduleContext IInvocationContext:模組的 IInvocationContext

testRunEnded

public void testRunEnded (long elapsedTime, 
                HashMap<String, MetricMeasurement.Metric> runMetrics)

測試執行結束時會回報。FIXME:我們無法使用不同型別的兩個 Map<> 介面,因此必須在此使用 HashMap。

參數
elapsedTime long:裝置回報的經過時間 (以毫秒為單位)

runMetrics HashMap:在測試執行結束時,使用 Metric 報告的鍵/值組合。