GranularRetriableTestWrapper.StartEndCollector
public
class
GranularRetriableTestWrapper.StartEndCollector
extends ResultAndLogForwarder
| java.lang.Object | |||
| ↳ | com.android.tradefed.result.ResultForwarder | ||
| ↳ | com.android.tradefed.result.ResultAndLogForwarder | ||
| ↳ | com.android.tradefed.testtype.suite.GranularRetriableTestWrapper.StartEndCollector | ||
用於擷取缺少的執行開始和結束時間的類別輔助程式。
摘要
欄位 | |
|---|---|
public
boolean |
mRunEndedReported
|
public
boolean |
mRunStartReported
|
公用方法 | |
|---|---|
void
|
testRunEnded(long elapsedTimeMillis,
回報測試執行結束。 |
void
|
testRunStarted(String runName, int testCount)
回報測試執行作業的開始時間。 |
void
|
testRunStarted(String runName, int testCount, int attemptNumber, long startTime)
回報測試執行作業的開始時間。 |
void
|
testRunStarted(String runName, int testCount, int attemptNumber)
回報測試執行作業的開始時間。 |
欄位
mRunEndedReported
public boolean mRunEndedReported
mRunStartReported
public boolean mRunStartReported
公用方法
testRunEnded
public void testRunEnded (long elapsedTimeMillis,
runMetrics) 回報測試執行結束。
| 參數 | |
|---|---|
elapsedTimeMillis |
long:裝置回報的經過時間,以毫秒為單位 |
runMetrics |
:測試執行結束時回報的鍵/值組合 |
testRunStarted
public void testRunStarted (String runName,
int testCount)回報測試執行作業的開始時間。
| 參數 | |
|---|---|
runName |
String:測試執行作業名稱 |
testCount |
int:測試執行作業中的測試總數 |
testRunStarted
public void testRunStarted (String runName,
int testCount,
int attemptNumber,
long startTime)回報測試執行作業的開始時間。
| 參數 | |
|---|---|
runName |
String:測試執行作業名稱 |
testCount |
int:測試執行作業中的測試總數 |
attemptNumber |
int:訂單號碼,用於識別同一個 runName 執行多次的不同嘗試。attemptNumber 的索引為 0,每次執行新測試時,應增加 1。舉例來說,如果測試重試 3 次,則在相同的 runName 下,應有 4 次總執行次數,而 attemptNumber 則從 0 到 3。 |
startTime |
long:透過 System.currentTimeMillis() 測量的執行作業開始時間 |
testRunStarted
public void testRunStarted (String runName,
int testCount,
int attemptNumber)回報測試執行作業的開始時間。
| 參數 | |
|---|---|
runName |
String:測試執行作業名稱 |
testCount |
int:測試執行作業中的測試總數 |
attemptNumber |
int:訂單號碼,用於識別同一個 runName 執行多次的不同嘗試。attemptNumber 的索引為 0,每次執行時都應遞增。舉例來說,如果測試重試 3 次,則在相同的 runName 下,應有 4 次執行,而 attemptNumber 則從 0 到 3。 |