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, runMetrics) testRunEnded (long elapsedTimeMillis, runMetrics) 報告測試運行結束。 |
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
公共方法
測試運行結束
public void testRunEnded (long elapsedTimeMillis,runMetrics)
報告測試運行結束。 FIXME:我們不能有兩個不同類型的 Map<> 接口,所以我們必須在這裡使用 HashMap。
參數 | |
---|---|
elapsedTimeMillis | long :設備報告的經過時間,以毫秒為單位 |
runMetrics | Metric 的測試運行結束時報告的鍵值對。 |
測試運行開始
public void testRunStarted (String runName, int testCount)
報告測試運行的開始。
參數 | |
---|---|
runName | String : 測試運行名稱 |
testCount | int :測試運行中的測試總數 |
測試運行開始
public void testRunStarted (String runName, int testCount, int attemptNumber, long startTime)
報告測試運行的開始。
參數 | |
---|---|
runName | String : 測試運行名稱 |
testCount | int :測試運行中的測試總數 |
attemptNumber | int :訂單號,標識同一 runName 多次運行的不同嘗試。 attemptNumber 是 0-indexed 並且應該在每次新的運行發生時遞增。例如,一個測試是粒度重試 3 次,它應該在相同的 runName 下總共運行 4 次,並且嘗試編號是從 0 到 3。 |
startTime | long :運行開始的時間,通過System.currentTimeMillis() 測量 |
測試運行開始
public void testRunStarted (String runName, int testCount, int attemptNumber)
報告測試運行的開始。
參數 | |
---|---|
runName | String : 測試運行名稱 |
testCount | int :測試運行中的測試總數 |
attemptNumber | int :訂單號,標識同一 runName 多次運行的不同嘗試。 attemptNumber 是 0-indexed 並且應該在每次新的運行發生時遞增。例如,一個測試是粒度重試 3 次,它應該在相同的 runName 下總共運行 4 次,並且嘗試編號是從 0 到 3。 |