報告通過測試
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) 報告由於某些錯誤情況導致的不完整調用。 |
void | invocationStarted ( IInvocationContext context) 報告測試調用的開始。 |
void | setConfiguration ( IConfiguration configuration) 注入正在使用的 |
void | setLogger ( ITestLogger logger) |
boolean | supportGranularResults () 如果 reporter 支持粒度結果,則返回 True,否則返回 false。 |
void | testModuleEnded () 報告模塊運行結束。 |
void | testModuleStarted ( IInvocationContext moduleContext) 報告模塊運行的開始。 |
void | testRunEnded (long elapsedTime, runMetrics) testRunEnded (long elapsedTime, runMetrics) 報告測試運行結束。 |
公共構造函數
報告通過測試
public ReportPassedTests ()
公共方法
調用結束
public void invocationEnded (long elapsedTime)
報告調用已終止,無論是成功終止還是由於某些錯誤情況。
將由 TradeFederation 框架自動調用。參數 | |
---|---|
elapsedTime | long :調用經過的時間(以毫秒為單位) |
調用失敗
public void invocationFailed (FailureDescription failure)
報告由於某些錯誤情況導致的不完整調用。
將由 TradeFederation 框架自動調用。
參數 | |
---|---|
failure | FailureDescription :描述失敗原因的FailureDescription |
調用開始
public void invocationStarted (IInvocationContext context)
報告測試調用的開始。
將由 TradeFederation 框架自動調用。記者需要覆蓋此方法以支持多設備報告。
參數 | |
---|---|
context | IInvocationContext :有關調用的信息 |
設置配置
public void setConfiguration (IConfiguration configuration)
注入正在使用的IConfiguration
。
參數 | |
---|---|
configuration | IConfiguration |
支持粒度結果
public boolean supportGranularResults ()
如果 reporter 支持粒度結果,則返回 True,否則返回 false。
退貨 | |
---|---|
boolean |
測試模塊結束
public void testModuleEnded ()
報告模塊運行結束。
測試模塊啟動
public void testModuleStarted (IInvocationContext moduleContext)
報告模塊運行的開始。此回調與testModuleEnded()
關聯,並且在序列中是可選的。它僅在使用模塊的運行期間使用:基於套件的運行器。
參數 | |
---|---|
moduleContext | IInvocationContext :模塊的IInvocationContext 。 |
測試運行結束
public void testRunEnded (long elapsedTime,runMetrics)
報告測試運行結束。 FIXME: 我們不能有兩個不同類型的 Map<> 接口,所以我們必須在這裡使用 HashMap。
參數 | |
---|---|
elapsedTime | long :設備報告經過的時間,以毫秒為單位 |
runMetrics | Metric 報告的鍵值對。 |