套件結果報告器
public class SuiteResultReporter
extends CollectingTestListener
java.lang.Object | ||
↳ | com.android.tradefed.result.CollectingTestListener | |
↳ | com.android.tradefed.result.suite.SuiteResultReporter |
收集整個套件調用的測試結果並輸出最終結果。
概括
嵌套類 | |
---|---|
class | SuiteResultReporter.ModulePrepTimes 一個模塊的準備和拆卸時間的對象持有者。 |
領域 | |
---|---|
public static final String | SUITE_REPORTER_SOURCE
|
公共構造函數 | |
---|---|
SuiteResultReporter () |
公共方法 | |
---|---|
int | getCompleteModules () |
long | getFailedTests () |
getModulesAbi () 返回模塊 abi 的映射: | |
long | getPassedTests () |
TestSummary | getSummary () |
int | getTotalModules () |
long | getTotalTests () |
void | invocationEnded (long elapsedTime) 報告調用已終止,無論是成功終止還是由於某些錯誤情況。 |
void | invocationStarted ( IInvocationContext context) 報告測試調用的開始。 |
void | testModuleStarted ( IInvocationContext moduleContext) 報告模塊運行的開始。 |
受保護的方法 | |
---|---|
long | getCurrentTime () |
long | getEndTime () 返回調用的結束時間。 |
long | getStartTime () 返回調用的開始時間。 |
領域
SUITE_REPORTER_SOURCE
public static final String SUITE_REPORTER_SOURCE
公共構造函數
套件結果報告器
public SuiteResultReporter ()
公共方法
獲取完整模塊
public int getCompleteModules ()
退貨 | |
---|---|
int |
獲取失敗測試
public long getFailedTests ()
退貨 | |
---|---|
long |
獲取模塊Abi
publicgetModulesAbi ()
返回模塊 abi 的映射:
退貨 | |
---|---|
獲得通過測試
public long getPassedTests ()
退貨 | |
---|---|
long |
getTotalModules
public int getTotalModules ()
退貨 | |
---|---|
int |
獲取總測試
public long getTotalTests ()
退貨 | |
---|---|
long |
調用結束
public void invocationEnded (long elapsedTime)
報告調用已終止,無論是成功終止還是由於某些錯誤情況。
將由 TradeFederation 框架自動調用。參數 | |
---|---|
elapsedTime | long :調用經過的時間(以毫秒為單位) |
調用開始
public void invocationStarted (IInvocationContext context)
報告測試調用的開始。
將由 TradeFederation 框架自動調用。記者需要覆蓋此方法以支持多設備報告。
參數 | |
---|---|
context | IInvocationContext :有關調用的信息 |
測試模塊啟動
public void testModuleStarted (IInvocationContext moduleContext)
報告模塊運行的開始。此回調與testModuleEnded()
關聯,並且在序列中是可選的。它僅在使用模塊的運行期間使用:基於套件的運行器。
參數 | |
---|---|
moduleContext | IInvocationContext :模塊的IInvocationContext 。 |
受保護的方法
獲取當前時間
protected long getCurrentTime ()
退貨 | |
---|---|
long |
獲取結束時間
protected long getEndTime ()
返回調用的結束時間。
退貨 | |
---|---|
long |
獲取開始時間
protected long getStartTime ()
返回調用的開始時間。
退貨 | |
---|---|
long |
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2023-03-30 (世界標準時間)。
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"缺少我需要的資訊"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"過於複雜/步驟過多"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"過時"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻譯問題"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"示例/程式碼問題"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"其他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"容易理解"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"確實解決了我的問題"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"其他"
}]